I do have this regex that validates email addresses:
^\w+(\.\w+)*@(\w+\.)+\w{2,4}$
What I need is to append this current regex that will invalidate email addresses starting with none@
OR na@
How to? Thanks!
I do have this regex that validates email addresses:
^\w+(\.\w+)*@(\w+\.)+\w{2,4}$
What I need is to append this current regex that will invalidate email addresses starting with none@
OR na@
How to? Thanks!
Add negative lookahead to the beginning of the pattern:
^(?!none@|na@)\w+(\.\w+)*@(\w+\.)+\w{2,4}$