I
I
Issue2021-08-30 21:04:12
Parsing
Issue, 2021-08-30 21:04:12

How to find value by pattern in text in Python3 language?

I'm using the requests library to get content. What do I need to do to find and save all matches on the page using this pattern:
*@yandex.ru
*@gmail.com
*@mail.ru

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2021-08-31
@paulenot

To find a known substring, the in operator is sufficient: ('abc' in 'abcdef') == True
For more complex cases, see the re module .

A
alexbprofit, 2021-08-30
@alexbprofit

if '@yandex.ru' in getted:
    #your code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question