go to
http://www.regxlib.com/Default.aspxtype "email" in the keyword box, then click on search button, you will get a list of regular expressions for emails, for example, here is one that adheres directly to the specification for email address naming^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$ here is a javascript function:function isValidEmail(str)
{
var re = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (re.test(str))
return true;
else
return false;
}
http://www.regxlib.com/Default.aspxtype "email" in the keyword box, then click on search button, you will get a list of regular expressions for emails, for example, here is one that adheres directly to the specification for email address naming^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$ here is a javascript function:function isValidEmail(str)
{
var re = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (re.test(str))
return true;
else
return false;
}
function isEmail(s)
{
var regu="^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$";
var re=new RegExp(regu);
if(s.search(re)!= -1)
return true;
else
return false;
}