mardi 23 juin 2015

Regular Expression for Email accepting some special characters

I am using following Regular expression for email validation

VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i

Which works perfectly but only one issue is there

.@xyz.com is also consider as Valid email address.

What i need to change in regular expression so that it should check atleast one [a-z] alphabate before @

Aucun commentaire:

Enregistrer un commentaire