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@somethingorsome@some.com
Now I want a condition as
- There should only be two periods before and after
@, which meanssome.some.some@heven.co.ukshould be valid andsome.some.some.some@heven.co.uk.govshould be invalid.
How to modify this regex for the above condition?