I have a following string:
<pre>one</pre><p><b>two</b></p>\n<pre>DO NOT MATCH</pre><pre>BALLS</pre>
I want to match <pre></pre>
tags and replace them with <p></p>
I do not want to match a part with multiple spaces
<pre>DO NOT! !MATCH</pre>
Here it is my regex:
<pre>((?:[^\n]+?))</pre>
It matches all tokens inside <pre></pre>
tags that are on a single line.
Actual result:
<p>one</p>
<p><b>two</b></p>\n<p>DO NOT MATCH</p>
<p>BALLS</p>
Expected result:
<p>one</p>
<p><b>two</b></p>\n
<p>BALLS</p>