Problem: email should allow +/- characters in user, – in domain.
dash (-) should be allowed anywhere in an email address or domain.
plus (+) is allowed in the username (many people use this for categorization, especially at gmail)

Solution :

var regex = new RegExp("^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$","i");

This will validated also emails like: username1+username2@gmail-domain.co.uk

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>