Answer the question
In order to leave comments, you need to log in
What regular expression is needed to take the line to the end after the first few words?
Is there such a text, how to take this line to the end after a digit or tsirf, a dot and the beginning of a word?
26.
It
's a Wonderful Life (1946
) you can write for a long time. Once again the director...
Answer the question
In order to leave comments, you need to log in
import re
txt = '''
26. Эта замечательная жизнь (It’s a Wonderful Life) (1946)
Мысли о самоубийстве одолевают в определенные периоды жизни любого че...
27. Однажды на Диком Западе (C’era una volta il West) (1968)
Об этом вестерне Серджио Леоне можно писать долго. Режиссер в очередной раз
'''
m = re.findall(r'(?m)^\d+\.\s*(.*)', txt)
print(m)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question