def regex(self):
qtext = '<STR_LIT>'<EOL>dtext = '<STR_LIT>'<EOL>atom = '<STR_LIT>'<EOL>atom += '<STR_LIT>'<EOL>quoted_pair = '<STR_LIT>'<EOL>domain_literal = "<STR_LIT>" % (dtext, quoted_pair)<EOL>quoted_string = "<STR_LIT>" % (qtext, quoted_pair)<EOL>domain_ref = atom<EOL>sub_domain = "<STR_LIT>" % (domain_ref, domain_literal)<EOL>word = "<STR_LIT>" % (atom, quoted_string)<EOL>domain = "<STR_LIT>" % (sub_domain, sub_domain)<EOL>local_part = "<STR_LIT>" % (word, word)<EOL>addr_spec = "<STR_LIT>" % (local_part, domain)<EOL>email_address = re.compile('<STR_LIT>' % addr_spec)<EOL>return email_address<EOL>
RFC822 Email Address Regex
Originally written by Cal Henderson
c.f. http://iamcal.com/publish/articles/php/parsing_email/
Translated to Python by Tim Fletcher with changes suggested by Dan Kubb
http://tfletcher.com/lib/rfc822.py
Licensed under a Creative Commons Attribution-ShareAlike 2.5 License
http://creativecommons.org/licenses/by-sa/2.5/
:return: