the one true email regex [was] [thelist] REGEX: Tip- A regex library

j.d. welch so.there at
Mon Jun 16 16:47:20 CDT 2003

On Monday, June 16, 2003, at 01:53 PM, Chris W. Parker wrote:

>> Too bad all of the email regex examples fail RFC 822:
> Not trying to be sarcastic at all, but since I'm not very good at 
> regex do you think you can provide a proper solution?

this came up recently on another list i read (and this one too, i 
believe).  jeffrey friedl, in 'mastering regular expressions,' has done 
(and quite some time ago) just such an rfc-abiding regex; the best link 
to it i could find was 

the full syntax, and explanation, is included in the print version of 
the book.  it's 4,724 bytes long, and proves the point that either a) 
you can validate e-mail addresses for real, with something so intensely 
complex that the somewhat theoretical example for doing so is at nearly 
the end of a well-regarded book on the subject or b) you can do it 
half-assed, to varying degrees of same.  most people vote for the 
latter, often to my dismay-- say when i want to use something as simple 
as "so.there+spam at".


    J.D. Welch			|  so.there at
    graphic designer    	|
    web developer       		|
    i'm available 			|

More information about the thelist mailing list