note 75674 added to function.preg-match
| From: | ElierDelgado at osu1 dot php dot net | Date: | Mon, 11 Jun 2007 15:55:43 +0000 |
| Subject: | note 75674 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127391@lists.php.net to get a copy of this message | ||
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
----
Server IP: 69.147.83.197
Probable Submitter: 200.55.181.37
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/75674
Del: integrated -- https://master.php.net/note/delete/75674/integrated
Del: useless -- https://master.php.net/note/delete/75674/useless
Del: bad code -- https://master.php.net/note/delete/75674/bad+code
Del: spam -- https://master.php.net/note/delete/75674/spam
Del: non-english -- https://master.php.net/note/delete/75674/non-english
Del: in docs -- https://master.php.net/note/delete/75674/in+docs
Del: other reasons-- https://master.php.net/note/delete/75674
Reject -- https://master.php.net/note/reject/75674
Search -- https://master.php.net/manage/user-notes.php