note 14124 added to function.ereg.php
| From: | php at unreelpro dot chek dot com | Date: | Wed, 18 Jul 2001 10:10:24 +0000 |
| Subject: | note 14124 added to function.ereg.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15531@lists.php.net to get a copy of this message | ||
Just when you thought email validation was a dead issue...
the majority of email validation routines do not allow a period as the last character before the @,
but such email addresses do exist (perhaps illegally).<br>
So to update the routine posted by btcsux@yahoo.com above, use:
if
(eregi("^[0-9a-z]([-_.]?[0-9a-z]\.?)*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](g|l|m|pa|t|u|v)?$",
$email, $check))
http://www.php.net/manual/en/function.ereg.php