Given the following Regular Expression:
And the text:
Running a match against the text never finds a match for the second thing (MyString-Dash) because the '-' (dash) character isn't a word boundary character. ...
Trying to check input against a regular expression.
The field should only allow alphanumeric characters, dashes and underscores and should NOT allow spaces.
However, the code below allows spaces.
What am I missing?
I have a strings that looks like this:
"wes-1 className Another"
"wes-2-bos className Another"
"wes-3 className Another"
"wes-5-bos className Another"
I need to return the ones that are wes-* and delete everything else.
Regex makes my head ...