You are here: RE: [PHP] email validation regex « PHP « IT news, forums, messages
RE: [PHP] email validation regex

Posted by "bruce" on 09/16/05 18:34

perl has a mod "email::valid" that claims to do email validation, and it
appears to be fairly complex/lengthy.

i'm considering simply using this in a perl app, that i'd then call from the
php function...

use the best tool for the job in the quickest manner!!!

thoughts....

-bruce


-----Original Message-----
From: Kevin Waterson [mailto:kevin@oceania.net]
Sent: Friday, September 16, 2005 8:08 AM
To: php-general@lists.php.net
Subject: Re: [PHP] email validation regex


This one time, at band camp, "bruce" <bedouglas@earthlink.net> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация