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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -