note 4220 deleted from ereg by jmoore
| From: | jmoore@php.net | Date: | Wed, 14 Feb 2001 20:12:36 +0000 |
| Subject: | note 4220 deleted from ereg by jmoore | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11073@lists.php.net to get a copy of this message | ||
Still with email validity checking..
<pre>eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z].)+[a-z]{2}[mtgvu]?$",
$email)</pre>
This one is not yet fully RFC822 compliant, but checks for domains since they must not start or end
with a dash. It also checks that the third letter of the tld (top level domain) is a valid one (com,
net, org, gov, edu, int). Hope this helps.