Re: Verify Email
| From: | WebWorkshop | Date: | Wed, 20 Dec 2000 21:07:35 +0000 |
| Subject: | Re: Verify Email | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31317@lists.php.net to get a copy of this message | ||
Hi, this is my first posting to this list. Here's the one I came up with;
it's my first try, would appreciate any comments:
eregi("^[a-z0-9]{1}[a-z0-9._-]*@[a-z0-9]{1}[a-z0-9-]*\.[a-z.]{2,}$", $email)
This one allows four-letter (or more, actually) TLDs (like .aero).
~ Chris Calabrese
WebWorkshop Webmaster
http://www.webworkshop.org
----- Original Message -----
From: "Daniel Convissor" <danielc@analysisandsolutions.com>
To: "PHP List" <php-general@lists.php.net>
Sent: Wednesday, December 20, 2000 10:39 AM
Subject: Re: [PHP] Verify Email
> Greg and crew:
>
> > Would appreciate suggestions on rewrites..
>
> if ( !eregi("^[a-z0-9_.=-]+@([a-z0-9-]+\.)+([a-z]{2,3})$", "$Email") ) {
> echo "BAD DOG!";
> }
>
> --Dan
>