The code:
$message = preg_replace("/<div style='background-color:#C0C8D0;width:95%;'>SMA Forráskód: <a href='' onclick='selectcode\\((.*)\\);return false;'>\\[ Mindet kijelol \\]<\\/a><\\/div><div id='(.*)' style=\"width:95%;max-width:95%;max-height: 500px; overflow:scroll;background-color: #FFFFFF;\"><pre class=\"sma\" style=\"font-family:monospace;font-size: 12px;\"><ol><li style=\"font-weight: normal; vertical-align:top;\"><div style=\"font: normal normal 1em\\/1\\.2em monospace; margin:0; padding:0; background:none; vertical-align:top;\">(.*)<\\/div><\\/li><\\/ol><\\/pre><\\/div>/", '[sma]<pre>$3</pre>[/sma]',$message);
Its work, only if the post is have only one line. I want to use multiple lines:
Example: Now i edit this post
->
[sma]Now i edit this post[/sma]
Its good, and i have more lines: Example:
line1
line2
line3
line4
line5
line6
this output:
[sma]line1line2line3line4line5line6[/sma]
and i want:
[sma]line1
line2
line3
line4
line5
line6
[/sma]
The multiple lines html output:
<div style='background-color:#C0C8D0;width:95%;'>SMA Forráskód: <a href='' onclick='selectcode(93347);return false;'>[ Mindet kijelol ]</a></div><div id='93347' style="width:95%;max-width:95%;max-height: 500px; overflow:scroll;background-color: #FFFFFF;"><pre class="sma" style="font-family:monospace;font-size: 12px;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line1</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line2</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line3</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line4</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line5</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">line6</div></li></ol></pre></div>