Posted on: 6/6/2014 5:20:50 AM | Views : 409

I am writing a regular expression to validate an email address in JavaScript.
/^[a-zA-Z]([\w-\.]{4,29})+@([\w-]+\.)+[a-zA-Z]{2,3}$/ This is working fine. But there came an additional requirement like " In a GMAIL address we can specify the folder name along with the email id to which the mail will be delivered. For ex. james+office@gmail.com , the mail will be delivered to the folder "office" under james@gmail.com's inbox. So how can I validate that also in the above regex. The Plus symbol is not mandatory but if + is added it should be in between the other characters before @ symbol.

Go to the complete details ...