Till now I have created a regular expression as
Pattern="^(?=.*[a-zA-Z].*)([a-zA-Z0-9._%+-]+@([a-zA-Z0-9-]+[a-zA-Z0-9-]+(\.([a-zA-Z0-9-]+[a-zA-Z0-9-])+)?){1,4})$"
which satisfies conditions as
- All should not be numbers as
111@111.111
- The mail id should not be made up of special characters as
###@###.###
- It should validate
something@something
orsome@some.com
Now I want a condition as
- There should only be two periods before and after
@
, which meanssome.some.some@heven.co.uk
should be valid andsome.some.some.some@heven.co.uk.gov
should be invalid.
How to modify this regex for the above condition?