note 50982 deleted from function.eregi by felipe

From: Date: Mon, 10 Dec 2007 02:35:37 +0000
Subject: note 50982 deleted from function.eregi by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133127@lists.php.net to get a copy of this message
Note Submitter: gorbiz ---- About the email verification posted by "emil at janesten dot com" I figured the maximum length of top domains is more than 4, at least 6, (ex .museum). Just replace {2,4} with {2,6}, like this: <?php $email = "user@example.com"; if (eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $email)) { echo "'$email' is a valid email!"; } ?>

« previous php.notes (#133127) next »