Hi all,
I would like to replace line breaks such '[\n\r]+' with '<br />'. Easy
task. Problems start when I try to only replace lines that do not end
with HTML tags.
I tried preg_replace("/[^>][\n\r]+/", "<br />\n") but this does not
seem to work.
An example to better understand what I would like to achieve:
first line
<title>Title</title>
third line
should give:
first line<br />
<title>Title</title>
third line<br />
Any help would be grateful appreciated. Thanks and have a nice day,
christian