I have used this to good effect

 function isEmail($email)
 {
     if
 (eregi("^[a-z0-9]+([-_\.]?[a-z0-9])[EMAIL 
PROTECTED]([-_\.]?[a-z0-9])+\.[a-z]{2,4}",$email))
  {
          return TRUE;
  } else {
          return FALSE;
     }
 }//end function


I often have a '+' in my email address (which is perfectly valid) and
it really annoys me when a site refuses to accept it.

Didn't notice this before but that regex ignores valid TLD's too like .museum, .travel .. Probably not that common but certainly valid.

http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to