Sure, the pattern is basically replacing
-
Unlimited spaces before
\s*
-
As many newlines and carriage returns
[\n\r]+
-
and unlimited spaces after
\s*
With a closing paragraph tag and a new paragraph tag (see “New value”). So,
abc
def
ghi
becomes
abc</p>
<p>def</p>
<p>ghi
But those are all replacing newlines in-between each line, so you still need a starting paragraph tag and closing paragraph tag for the first and last line. Hence putting it here:
so you get
<p>abc</p>
<p>def</p>
<p>ghi</p>