Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def parse_emails(text): # Need to fix docstring
- """
- Takes a string from which you want to find a emails.
- Returns a list with emails.
- >>> text_emails = '''
- ... mymail@mail.ru
- ... nocom@gmail
- ... nodomain@
- ... @noname.ru
- ... onlydomain.ru
- ... MyMail@rambler.ru
- ... CUPS@yandex.com
- ... norm@YANDEX.COM
- ... vlad1990@cobra.su
- ... 12345@mail.com
- ... domain@123.ru
- ... domain@123.123
- ... checksizeeeeeeeeeeeeee@mail.com
- ... min@mail.ru
- ... mi@mail.ru
- ... m@gmail.com
- ... '''
- >>> parse_emails(text_emails)
- ['mymail@mail.ru', 'MyMail@rambler.ru', 'CUPS@yandex.com',
- 'vlad1990@cobra.su', '12345@mail.com', 'domain@123.ru',
- 'checksizeeeeeeeeeeeeee@mail.com', 'min@mail.ru', 'mi@mail.ru']
- """
- return EMAIL_REGEXP.findall(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement