I am using a string which contains a regex expression to validate an email, the email is validating properly,unless a "+" symbol is included in the email. if someone has a email id suppose like this "billgates+apple@gmail.com", so at this point my regex is not working itz giving me a invalid username message,for else email id itz working fine here is my regex
string strPattern = "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
I tried using other regex which validates for special symbols but still i have the same error.
string strPattern = "^[a-zA-Z0-9]+([a-zA-Z0-9_.\\$&-]+)*@[a-zA-Z0-9]+([a-zA-Z0-9_.\\$&-]+)*\\.([a-zA-Z0-9]{2,4})$";
if anyone can help out,it will be usefull,thanx