note 76090 deleted from function.preg-match by nlopess
| From: | nlopess@php.net | Date: | Sat, 01 Sep 2007 12:04:12 +0000 |
| Subject: | note 76090 deleted from function.preg-match by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-130011@lists.php.net to get a copy of this message | ||
Note Submitter: florian dot beisel at gmail dot com
----
function checkEmailAddress($mail)
$regex = '/\A(?:[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+'
.'(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@'
.'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|'
.'com|org|net|gov|biz|info|name|aero|biz|info|jobs|'
.'museum)\b)\Z/i';
if (preg_match($regex, $mail)) {
return true;
} else {
return false;
}