[IMP] tools.email_split
bzr revid: fp@tinyerp.com-20120816164239-yl1vzp83w6z5xi5i
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user