Using a regex for RFC 822 isn't a very good idea.  To start off, it's
an ARPA standard from 1982.  RFC 2822 replaced it in 2001.  But even
just following that isn't good enough because of the reasons you've
stated about UTF-8 and domain names.  The RFC for IRI's (RFC 3987)
wasn't released until 2005, and you definitely want to include any
valid IRI as the domain for your email addresses.


On Jun 28, 11:45 pm, Bil Corry <[EMAIL PROTECTED]> wrote:
> But for the truly pedantic, here's the regex to validate RFC 822 email 
> addresses:
>
> <http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>
>
> Just note that whatever method you choose, the top-level domains are being 
> opened up.  So instead of .com, .org, .net, etc..., there could be some 70 
> million of them, such as .jquery.  The other interesting change is UTF-8 
> domains; for example, it could "allow Chinese organizations to register 
> domain names written using Chinese ideograms, ending with the two Chinese 
> symbols meaning 'China.'"
>
> <http://www.networkworld.com/news/2008/062608-board-opens-way-for-new....>
>
> - Bil

Reply via email to