note 25438 deleted from function.eregi by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 09:03:52 +0000 |
| Subject: | note 25438 deleted from function.eregi by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196872@lists.php.net to get a copy of this message | ||
Note Submitter: mark dot edwards dot no dot spam at rayconNOSPAM dot com dot au
----
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.