I want to replace, in JavaScript, all lines that ends with semicolon ;
with <li>$1</li>
.
Example:
<p>one</p>
<p>two</p>
<p>three;</p>
<p>four;</p>
<p>five</p>
Would become:
<p>one</p>
<p>two</p>
<li>three</li>
<li>four</li>
<p>five</p>
(I don't have newlines, but <p>first</p><p>second</p>etc.
)
I tried with this regex:
/<p>(.*?;)<\/p>/
but this match from the first <p>
.
I would also like to wrap them in <ul></ul>
but I think this is super advanced.