How to use ? with a string in RegEx? -
basically want check following
www
should not in string, doesn't work in following regex character separated |. w|w|w..
[^www]?
how can solve problem? there easy possibility?
you don't need optional operator ?
here. can use negative lookahead assertion.
^(?!.*www).*$
Comments
Post a Comment