c# - Need Regular Expression for Email Id with special characters .()<>\\" space ; -


i need regular expression email id contains special characters .;<>[]\" space , @ sign.it should not allow multiple spaces in between. username can't start space may contain space inbetween like

"john "smith\@yahoo.com

the email id can below

very.(),:;<>[]\".very.\"very@\\ \"very\".unusual"@strange.example.com  

the regex should work c# [regularexpression("^[a-za-z0-9_\\.-]+@([a-za-z0-9-]+\\.)+[a-za-z]{2,6}$", errormessage = "e-mail not valid")] , jquery

thanks in advance

try this

<asp:regularexpressionvalidator id="regularexpressionvalidator2"                  runat="server" errormessage="please enter valid email id"                     validationgroup="submit" controltovalidate="txtemail"                      cssclass="requiredfieldvalidatestyle"                     forecolor="red"                      validationexpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">                     </asp:regularexpressionvalidator> 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -