Tuesday, 3 September 2013

How to combine following regex?

How to combine following regex?

^[A-Za-z0-9_-]{5,20}$
and
(?i)^(?!.*?(admin|manager)).*$
So the result would be alpha-numeric string with possible underscore
or/and hyphen
and following two strings would not be allowed: "admin" "manager"
regardless of string position and lettercase
In isolation I understand both but find it challenging even to start
merging them together.

No comments:

Post a Comment