hey I am also in a similar situation.
I need to validate user input. This is how I do./^[\w\._-]{5,10}$/
This allows a periods, underscores, hypens, any alphanumerics and its length should be in range of 5-10
Now I need to blacklist certain key words like 'drop' 'delete' insert' etc. which should not be allowed
/^[\w\._-]{5,10}$/
This allows a periods, underscores, hypens, any alphanumerics and its length should be in range of 5-10
Now I need to blacklist certain key words like 'drop' 'delete' insert' etc. which should not be allowed
How do I add this extra condition checking to the above expression??
I tried adding this ^[^drop|delete|insert]+$ to the above expression which results in
/^[\w\._-]{5,10}^[^drop|delete|insert]+$/ but this doesn't work
Sergei Z, plz help me.
Thanks in advance.