note 75674 deleted from function.preg-match by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 01:44:21 +0000 |
| Subject: | note 75674 deleted from function.preg-match by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133078@lists.php.net to get a copy of this message | ||
Note Submitter: Elier Delgado
----
I'm not happy with any pattern of email address that I have seen.
The fallowing address are wrong:
email1..@myserver.com
email1.-@myserver.com
email1._@myserver.com
email1@2sub.myserver.com
email1@sub.sub.2sub.myserver.com
So, this is my pattern:
$pat =
"/^[a-z]+[a-z0-9]*[\.|\-|_]?[a-z0-9]+
@([a-z]+[a-z0-9]*[\.|\-]?[a-z]+[a-z0-9]*[a-z0-9]+){1,4}
\.[a-z]{2,4}$/";
Best Regards, Elier
http://www.faqs.org/rfcs/rfc1035.html
RFC 1035 - Domain names - implementation and specification