I am trying to validate an email address. I currently have:
private static final String EMAIL_PATTERN =
"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
This will validate any email but I am trying to validate only a company specific email e.g.
myname@specificemail.com
The email will always end with .com but i would like the ability to change the company name at a later date with a different specific string e.g. @anotheremail.com, @somethingelse.com
Can anyone help with with the syntax?
Thanks