replace <br> to new line between pre tag
Posted
by saturngod
on Stack Overflow
See other posts from Stack Overflow
or by saturngod
Published on 2010-06-12T10:27:33Z
Indexed on
2010/06/12
10:33 UTC
Read the original article
Hit count: 234
I want to convert
<p>Code is following</p>
<pre>
<html><br></html>
</pre>
to
<p>Code is following</p>
<pre>
<html>
</html>
</pre>
I don't know how to write regular expression for replace between pre tag in PHP.
I tried this code http://stackoverflow.com/questions/1517102/replace-newlines-with-br-tags-but-only-inside-pre-tags
but it's not working for me.
© Stack Overflow or respective owner