I’m using the following for email validation:
var filter = /^(\w+)(\.\w+)*@(\w+)(\.\w+)+$/;
Just noticed that it does not support xxxx+wildcard@gmail.com (it does not support the +wildcard part). Any way to get that added?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I liked SLak’s answer. I actually have a regular expression I wrote awhile back that’s even more open-ended.
The idea behind it is similar. Don’t try so hard. Instead, err on the side of accepting too much. To my knowledge this regex should accept every conceivable valid email address (and some invalid ones as well).