Click here to Skip to main content
15,917,731 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have following Pattern for Email address validation using javascript.

var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+$/;

Its working fine.. but i just want to allow "&" within email address (before @)..

can anybody help me to modify regx.. i am bit new with this updation.

Regards,
Vijay Radia
Posted
Comments
Amalraj Ramesh 7-Mar-14 6:54am    
/^([a-zA-Z0-9_.-&])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+$/;

Try:
JavaScript
var pattern=/^([a-zA-Z0-9_.-&])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+$/;
 
Share this answer
 
check this pattern
var pattern=/^([a-zA-Z0-9_.-&])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+$/;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900