Returns a list of e-mail addresses parsed from the string.
(string, unique=True)
| 616 | RE_EMAIL = re.compile(r"[\w\-\.\+]+@(\w[\w\-]+\.)+[\w\-]+") # tom.de+smedt@clips.ua.ac.be |
| 617 | |
| 618 | def 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 | |
| 629 | def find_between(a, b, string): |
| 630 | """ Returns a list of substrings between a and b in the given string. |