Answer the question
In order to leave comments, you need to log in
How to write a regex in python so that in continuous text every sentence starting with "Operator:" wraps to the next line?
How to write a regular expression so that in a continuous text, each sentence starting with "ClientN :" wraps to the next line and erases the extra space?
For example:
text = '''
Оператор: Здравствуйте, чем могу помочь? Клиент : Есть идея: взял кредит, хочу погасить сразу весь. Возможно? Оператор: Минуточку, сейчас посмотрим, что можно сделать.
'''
Оператор: Здравствуйте, чем могу помочь?
Клиент: Есть идея: взял кредит, хочу погасить сразу весь. Возможно?
Оператор: Минуточку, сейчас посмотрим, что можно сделать.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question