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:
fresh eyes needed. Append won't work. (2000)
WC 2.0 frames feature (1997)
Time for a hard questions. (1997)
WebCommerce: Folder organization ? (1997)
WebCat2 Append problem (B14Macacgi) (1997)
URL too Long? (1997)
RE: Credit Card not accepted (1998)
Forms Search Questions (1997)
[WebDNA] HTML Symbol Entities (2009)
Emailer error code? (2001)
IE Cache Problems... (1999)
Webcatalog, Webstar and Crasharama (1999)
Purging the .hdr file from cache ... ? (2003)
ListFiles then delete by ModDate (2002)
Is [thisurl] http or https? (1998)
RE: [WebDNA] AUTONUMBER in Form (2020)
PSC recommends what date format yr 2000??? (1997)
ErrorMessages.db suggestion (1997)
carts on MacOS X Server (oops) (2000)
TaxTotal Problem (1997)