note 16436 added to function.eregi

From: Date: Tue, 30 Oct 2001 15:38:34 +0000
Subject: note 16436 added to function.eregi
Groups: php.notes 
Request: Send a blank email to php-notes+get-19602@lists.php.net to get a copy of this message
Please all remember that with the new domain TLD's out there the domain extension can be upto 8 characters long. Generic Top Level domains .info (currently active) New Net software domains (new.net) .famiglia (currently active) So adjust all them ereg's to include patterns with domain extensions upto 8 characters. <?php function is_email_valid($email) { if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,8}$", $email)) return TRUE; else return FALSE; } ?> Editors note: i'm not an ereg wizz so verify the {2,8} part plz. Stay up to date on new TLD's at the dnrpanel.com. -- http://www.php.net/manual/en/function.eregi.php http://master.php.net/manage/user-notes.php?action=edit+16436 http://master.php.net/manage/user-notes.php?action=delete+16436 http://master.php.net/manage/user-notes.php?action=reject+16436

« previous php.notes (#19602) next »