MCPcopy Index your code
hub / github.com/clips/pattern / find_email

Function find_email

pattern/web/__init__.py:618–627  ·  view source on GitHub ↗

Returns a list of e-mail addresses parsed from the string.

(string, unique=True)

Source from the content-addressed store, hash-verified

616RE_EMAIL = re.compile(r"[\w\-\.\+]+@(\w[\w\-]+\.)+[\w\-]+") # tom.de+smedt@clips.ua.ac.be
617
618def find_email(string, unique=True):
619 """ Returns a list of e-mail addresses parsed from the string.
620 """
621 string = u(string).replace(u"\u2024", ".")
622 matches = []
623 for m in RE_EMAIL.finditer(string):
624 s = m.group(0)
625 if not unique or s not in matches:
626 matches.append(s)
627 return matches
628
629def find_between(a, b, string):
630 """ Returns a list of substrings between a and b in the given string.

Callers

nothing calls this directly

Calls 2

groupMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…