<?php
# this one worked fine for me, but it does not cover the full RFC
like: "name" [EMAIL PROTECTED] OR name <[EMAIL PROTECTED]>
$regex = 
"^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)[EMAIL
 PROTECTED](\.[a-z0-9-]+)*\.([a-z]{2,})$";
if (eregi($regex, $email)) {
 // do something
}
# Beware that the filter functions only work under PHP5+. If your PHP
supports them they should be the preferred choice
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to