note 37028 rejected from function.ereg by pollita
| From: | pollita@php.net | Date: | Fri, 31 Oct 2003 05:34:39 +0000 |
| Subject: | note 37028 rejected from function.ereg by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59556@lists.php.net to get a copy of this message | ||
Note Submitter: admin2@ocularbox.com
----
For people who have a good deal of .something.something.something.co.uk, for example, at the end of
the email addresses they wish to validate. Here is a pattern that accepts upper and lower case
alpha, and numeric, "-", "_", ".", followed by a "@", and
the same rules as previously stated (only it doesn't accept ".", that's how it
finds the end of the root domain) followed by a "." then any number of "." +
string. As long as there is ".??" (IE ".bz" or ".uk")
^[_\.0-9a-zA-Z\-]+@([a-z0-9A-Z_\-])+\.([a-z0-9\.]){2,}$
valid: Foo_Bar.vice-pres@foo_net-net.com.co.uk
*This may be less than perfect, please do not grill me for it