Email Validation via Regex
There’s actually an old quote of mine floating around in some fortune files, back from when I was young and stupid. I’d tried to construct a regular expression to match all valid email addresses. I believe I even tried to accomodate bangpaths. I’m pretty sure it was wrong, though.
Anyway, Jacob Fugal’s made his own (slightly more modest) attempt. No source-routing or other obsolete constructs, but I think it stands a better chance of working; he based his directly on the productions in the RFC grammar.
Update: Cal Henderson’s got a broken-down formulation in PHP—Tim Fletcher’s done a Ruby translation.
(Seen on ruby-talk)