Created
August 31, 2021 02:34
-
-
Save OlegKorn/0b3dcb011a871bdae4c9cb481f4d0644 to your computer and use it in GitHub Desktop.
Python re findall websites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = '''<a href="dfsdfdsfd" target="_blank" class="_1rehek"> | |
сайт-сайт.рф</a> | |
</a>ваываыва4333.РФ | |
<div>www.dekorm.com</div> | |
https://wewefds.net | |
http://dsdfsdfs.org | |
www.fsdsdfsd.РФ | |
сайт.тест | |
сайт.домен | |
''' | |
re.findall(r'[\w.+-]+@[\w-]+\.[-\D]+', s) | |
>>>['сайт-сайт.рф', 'ваываыва4333.РФ', 'www.dekorm', 'wewefds.net', 'dsdfsdfs.org', 'www.fsdsdfsd', 'сайт.тест', 'сайт.домен'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment