3 ms·
I have an implementation of RFC3696 http://www.faqs.org/rfcs/rfc3696.html http://www.faqs.org/rfcs/rfc3696.html (which is the spec for validating emails) in Pyt
by andrewcooke 16y ago
I have an implementation of RFC3696 http://www.faqs.org/rfcs/rfc3696.html http://www.faqs.org/rfcs/rfc3696.html (which is the spec for validating emails) in Python here - http://www.acooke.org/lepl/api/lepl.apps.rfc3696-module.html http://www.acooke.org/lepl/api/lepl.apps.rfc3696-module.html
That is part of Lepl - http://www.acooke.org/lepl/ http://www.acooke.org/lepl/ - and although it's implemented in a recursive decent parser, much is compiled to regular expressions for efficiency. So you get the best of all worlds: regexp efficiency; parser accuracy; standards based.
A blog post on the compilation to regexps is here - http://www.acooke.org/cute/LEPLOptimi0.html http://www.acooke.org/cute/LEPLOptimi0.html