I have this current regex expression to validate emails:
^([0-9a-zA-Z]([-.\\w\\+]*[0-9a-zA-Z\\+])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$
I want this to include "_" and "." to validate emails like these:
These are the valid emails that should pass/im validating:
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com
Email@example.com
Email+book.28.feb@example.com
1234567890@example.com
email@example-one.com
_______@example.com
email@example.name
email@example.museum
email@example.co.jp
firstname-lastname@example.com
I've tried adding [0-9a-zA-Z_]
an underline here but doesn't seem to work