I'm new here, and I'm working on a student project
I need a regular expression for "at least one word"
Should it be \w+ ??
I'm new here, and I'm working on a student project
I need a regular expression for "at least one word"
Should it be \w+ ??
\w stands for “word character”. It always matches the ASCII characters [A-Za-z0-9_]
https://www.regular-expressions.info/shorthand.html
So [A-Za-z]+ should probably be better. Note that it will be ok for word from only one letter.