note 16436 deleted from function.eregi by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 02:05:35 +0000 |
| Subject: | note 16436 deleted from function.eregi by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20235@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.