[quote=user name]TEXT[/quote]
$replace[] = '/\[quote\=(.*?)\]((?:(?!\[\/?quote\]).)*)\[\/quote\]/is';
$rewrite[] = '<blockquote><div class="msg_quote"><span id="quote_from">$1 je napisal/a</span><span class="citiranje_text">$2</span></div></blockquote>';
$change = preg_replace($replace, $rewrite, $text_message);
答案 0 :(得分:0)
以下模式可行,
preg_replace("/\[quote=(.*?)](.*?)\[\/quote]/", $r, $sub);