You are here: Re: E-mail address syntax validation with regular expressions « PHP Programming Language « IT news, forums, messages
Re: E-mail address syntax validation with regular expressions

Posted by Tim Roberts on 09/25/05 07:39

John Dunlop <usenet+2004@john.dunlop.name> wrote:
>
>Mazin07 wrote:
>
>> /\w+@\w+\.\w+
>
>Ad hoc regular expressions to validate the syntax of e-mail addresses
>are invariably both too loose and too strict. Too loose in that they
>pass forms not allowed by RFC2822, too strict in that they reject
>forms allowed by RFC2822. Even the Mail::RFC822::Address pattern
>doesn't encompass the gamut of forms, but then it doesn't pretend to.

Jeffrey Friedl's book, "Mastering Regular Expressions" contains a complete
regular expression which matches all valid RFC 822 e-mail addresses. It is
more than 6,500 characters long.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

 

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

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