Re: email validation regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one time, at band camp, "bruce" <bedouglas@xxxxxxxxxxxxx> wrote:

> hi..
> 
> looking for a good/working/tested php email validation regex that conforms
> to the rfc2822 standard.

This will be fun, everybody has their own which is always best. No two people
will agree what is correct method and will always come with a 'better' one.
This is generally accompanied by derision and ridicule of the others.
To this end, I will start the ball rolling with this one...

preg_match('/^\S+@[\w\d.-]{2,}\.[\w]{2,6}$/iU', $email)


Kevin
-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux