> On Fri, 2005-03-11 at 13:12, Richard Lynch wrote:
>> > I've built this little regular expression to test wether an e-mail
>> > address is valid or not:
>> >
>> > if(eregi
>> > ("[EMAIL PROTECTED]",
>> > $email))

I can also say that the backslashes in here are maybe not doing what you
think...

Maybe \w has no meaning to PHP inside quotes, and maybe it does, but to be
SURE, use \\w where you want Regex to see \w

>>
>> 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.
>
> If it's the one by Friedl it's not correct either unless he found some
> way past the nesting limitation of regex.
>
> In which case why go for a 3 page "almost works" solution when you can
> go for a one line "almost works" solution that will catch 99.99999%
> (guess)
> of valid email addresses. It's doubtful anyone (in their right mind
> anyways)
> would rely solely on an email address for anything secure. At the very
> least they would send an email to the given address and request
> verification that the recipient owns it.

I'm more concerned about false rejections of perfectly valid emails.

I've run across more than a few sites that reject *MY* valid email address.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to