[IMP] tools.email_split

bzr revid: fp@tinyerp.com-20120816164239-yl1vzp83w6z5xi5i
This commit is contained in:
Fabien Pinckaers
2012-08-16 18:42:39 +02:00
parent 7be81475e1
commit b9bdf2c29a
+6
View File
@@ -1113,6 +1113,12 @@ class unquote(str):
def __repr__(self):
return self
def emails_split(text):
"""Return a list of the email addresses found in ``text``"""
if not text: return []
return re.findall(r'([^ ,<@]+@[^> ,]+)', text)
class UnquoteEvalContext(defaultdict):
"""Defaultdict-based evaluation context that returns
an ``unquote`` string for any missing name used during