Re: Regular expression to match email address
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50643
interpreted = N
texte = Marc Kaiwi wrote:> Does anyone have a good solid regular expression to match an email address?> The easiest way to test it is to attempt to use it in an e-mail message.It is not, in practice, possible to match all possible email addresses, since the schema (RFC-2822) is defined so vaguely. You can get a copy of Mastering Regular Expressions and see the discussion there. He comes up with a regex 4,724 bytes long, which ignores nested address comments (and requires all of the features of Perl's regex engine. Here's a link to the optimized code (in Perl): http://public.yahoo.com/~jfriedl/regex/code.htmlthat he developed for the First Edition of the book. The Second Edition has its own web site: http://regex.info/and I like the First Edition so much, I am planning on buying the Second for the new details he has added.The only foolproof way to see if an e-mail address is legitimate is to use a finite state machine encoding the RFC-2822 specs.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Marc Kaiwi wrote:> Does anyone have a good solid regular expression to match an email address?> The easiest way to test it is to attempt to use it in an e-mail message.It is not, in practice, possible to match all possible email addresses, since the schema (RFC-2822) is defined so vaguely. You can get a copy of Mastering Regular Expressions and see the discussion there. He comes up with a regex 4,724 bytes long, which ignores nested address comments (and requires all of the features of Perl's regex engine. Here's a link to the optimized code (in Perl): http://public.yahoo.com/~jfriedl/regex/code.htmlthat he developed for the First Edition of the book. The Second Edition has its own web site: http://regex.info/and I like the First Edition so much, I am planning on buying the Second for the new details he has added.The only foolproof way to see if an e-mail address is legitimate is to use a finite state machine encoding the RFC-2822 specs.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
John Peacock
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Group search - using contexts (2000)
Re:Searching for ALL / empty form field *the FINAL answer* (1997)
formula??? (2000)
suggestion (1997)
Simple way to create unique SKU (1997)
AD Error Msg (1997)
WebCatalog/WebMerchant 2.1 (1998)
Text variables do not show (1999)
Virtual hosting and webcatNT (1997)
WebCat2b15MacPlugin - showing [math] (1997)
WebCommerce: Folder organization ? (1997)
writefiles (1999)
Page Breaks (1999)
Server Freeze (1998)
Search in 2 or more catalogs (1997)
WebCat2 several catalogs? (1997)
WebCatalog can't find database (1997)
Emailer (1997)
PSC recommends what date format yr 2000??? (1997)
2.0 Info (1997)