Reputation: 1359
I'm trying to make this regex ^(?!\-\-\sRoaming)
to match with -- Roaming
but it doesnt. Am I matching correctly the white space between --
and Roaming
?
Upvotes: 2
Views: 3341
Reputation: 425033
Try this, which won't match if -- Roaming
is anywhere in the input:
^(?!.*--\sRoaming)
Note that you don't need to escape the hyphens.
Upvotes: 1
Reputation: 81
Yes you are correctly matching that portion of the Regex. I am a little hazy on Regex but what does the ?! mean? I tried the \-\-\sRoaming part in http://regexpal.com/ and it was working correctly.
Upvotes: 1