note 25438 added to function.eregi
| From: | mark dot edwards dot no dot spam at rayconNOSPAM dot com dot au | Date: | Tue, 24 Sep 2002 01:21:31 +0000 |
| Subject: | note 25438 added to function.eregi | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37166@lists.php.net to get a copy of this message | ||
The apostrophe is an allowable character in the username of an email address.
The regex I use for this is:
^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$
Escaping the apostrophe unfortunately allows users to put a backslash in their username and the
regex will not complain.
Better I feel to allow some errors through than to deny legitimate addresses.
--
http://www.php.net/manual/en/function.eregi.php
http://master.php.net/manage/user-notes.php?action=edit+25438
http://master.php.net/manage/user-notes.php?action=delete+25438
http://master.php.net/manage/user-notes.php?action=reject+25438