I have a string of html with consists of many <p>
tags and other html tags.
How can I replace <br />
tags between <p>
and </p>
tag, so that it become multiple paragraphs using regex?
(I need to replace in <p>
tag only, not in other tags)
Sample source:
<p> This is a paragraph without line break</p>
<p> This is a paragraph with <br /> line <br /> break</p>
Sample output:
<p> This is a paragraph without line break</p>
<p> This is a paragraph with </p><p> line </p><p> break</p>
only inside ? – A.Mikhailov Jul 31 '17 at 08:50
` if it is not between `
` tags - but your sample doesn't cover that.
– Sebastian Proske Jul 31 '17 at 08:52only inside