+ and ^ are special cases, need to go at the beginning of a []

This commit is contained in:
dave 2010-03-02 00:07:16 +00:00
parent c09e70d3e6
commit b49634f038

View File

@ -872,7 +872,7 @@ function outputStatus($status)
//returns true if its a valid email address, false if its not //returns true if its a valid email address, false if its not
function isEmailAddress($str) { function isEmailAddress($str) {
if(eregi('^[a-zA-Z0-9._-+]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str)) if(eregi('^[+a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str))
return true; return true;
else else
return false; return false;