I have some broken html-code that i would like to fix with regex.
The html might be something like this:
<p>text1</p>
<p>text2</p>
text3
<p>text4</p>
<p>text5</p>
But there can be much more paragraphs and other html-elements too.
I want to turn in into:
<p>text1</p>
<p>text2</p>
<p>text3</p>
<p>text4</p>
<p>text5</p>
Is this possible with a regex? I'm using php if that matters.