RE: [PHP] How to ge the ones which are not
| From: | Chris W. Parker | Date: | Fri, 11 Mar 2005 18:31:06 +0000 |
| Subject: | RE: [PHP] How to ge the ones which are not | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-210534@lists.php.net to get a copy of this message | ||
Richard Lynch <mailto:ceo@l-i-e.com>
on Friday, March 11, 2005 10:12 AM said:
>> I've built this little regular expression to test wether an e-mail
>> address is valid or not:
>>
>> if(eregi
>>
>> ("^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$",
>> $email))
>
> First, you should be aware that your RegEx is wrong.
>
> I know it's wrong, because the CORRECT Regex is 3 *PAGES* long in the
> camel book.
Speaking of that long regex... I seem to remember finding that in a ready made function somewhere.
But I can't find it in any of my code and I couldn't find it on the internet(s) last time
I checked. Do you happen to know where that can be had?
Chris.