Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Please evaluate: RegEx for validating e-mail addresses

by FoxtrotUniform (Prior)
on Sep 25, 2004 at 20:40 UTC ( #393848=note: print w/ replies, xml ) Need Help??


in reply to •Re^2: Please evaluate: RegEx for validating e-mail addresses
in thread Please evaluate: RegEx for validating e-mail addresses

I've only spent a few minutes looking for it, but my 2nd-edition Mastering Regular Expressions doesn't seem to include that regex. So I can't check my suspicion that the original MRE regex didn't actually match all RFC822 addresses, just most of them - I vaguely remember a disclaimer about comments in hostnames not being recognized, or some such. (Probably something recursive, now that I think about it.) Even Ovid's monstrous regex may not be complete.

--
F o x t r o t U n i f o r m
Found a typo in this node? /msg me
% man 3 strfry


Comment on Re^3: Please evaluate: RegEx for validating e-mail addresses
•Re^4: Please evaluate: RegEx for validating e-mail addresses
by merlyn (Sage) on Sep 25, 2004 at 20:44 UTC
    Yes, you remember almost correctly! The problem is nested comments. The oft-quoted monster regex deals with all comments, but no nested comments. Nested comments are impossible without resorting to trickery (a regex that only Perl could do because it has embedded Perl code).

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

Re^4: Please evaluate: RegEx for validating e-mail addresses
by tachyon (Chancellor) on Sep 26, 2004 at 07:26 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://393848]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2014-12-26 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls