Hello.
I will explain with an example. We have this text:
<p>Привет.</p> <p>.</p> <p>У нас Вы можете приобрести телефон iPhone.</p> <p>.</p><p>.</p> <p>Скидки:</p> <p>.</p> <p>.</p> <p>.</p> <p>При покупке 2-х и более - скидка 5%.</p>
You need to make this text out of this text:
<p>Привет.</p> <p>.</p> <p>У нас Вы можете приобрести телефон iPhone.</p> <p>.</p> <p>Скидки:</p> <p>.</p> <p>При покупке 2-х и более - скидка 5%.</p>
Those. if <p>.</p>
repeated more than 1 time in a row (consecutive - possible separators: space, line break), then the script leaves only 1 <p>.</p>
.
How to do this?