Quote:
Originally Posted by huebi
Hi,
how can i change
Code:
<div>
sentence1<br />
sentence2<br />
sentence3<br />
sentence4<br />
</div>
into
Code:
<p>sentence1</p>
<p>sentence2</p>
<p>sentence3</p>
<p>sentence4</p>
The Problem is there several amounts of sentences, sometimes 2, sometimes 3, sometimes more. Is there a way to do that with a regex? There are more then 500 div-sections, so doing that manually is a pain. A workaround might be doing it with 2, then 3, then 4 and so speratly.
thx in advance
|
I would do the Div first

<div>(.+)<br />\s+</div>
<p>\1</p>
now
replace the:
<br />
with
</p> <p>
Tidy will clean the code view after switching to BV
choosing the best order, leaves the least touch-up