RE: [PHP] eregi(mail)
| From: | Nathan Cassano | Date: | Fri, 10 May 2002 20:53:52 +0000 |
| Subject: | RE: [PHP] eregi(mail) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97014@lists.php.net to get a copy of this message | ||
This is what I have used.
<?
if(eregi("^[_.+a-z0-9-]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.([a-z]){2,4})\$",
$email)){
echo "Good Email!";
}
?>
Here is an excellent article on Regular Expressions.
Learning to Use Regular Expressions by Example
http://www.phpbuilder.com/columns/dario19990616.php3