note 50982 added to function.eregi

From: Date: Tue, 15 Mar 2005 20:15:14 +0000
Subject: note 50982 added to function.eregi
Groups: php.notes 
Request: Send a blank email to php-notes+get-86501@lists.php.net to get a copy of this message
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!"; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.eregi.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50982 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50982&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50982&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50982&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50982&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50982&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50982&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86501) next »