I want to be able to delete all instances of newlines within <p>
tags, but not the ones outside. Example:
<p dir="ltr">Test<br>\nA\naa</p>\n<p dir="ltr">Bbb</p>
This is the regex I came up with:
(<p[^>]*?>)(?:(.*)\n*)*(.*)(</p[^>]*?>)
and I replace with:
$1$2$3$4
I was hoping that this would work but (?:(.*)\n*)*
seems to be causing issues. Is there any way to do repeated matches like this, with a capturing group?
Thanks in advance!