我想要一个正则表达式
[QUOTE=3]
并将其转化为
<div class="quoted"><div class="quotation-author">Originally written by <strong>AUTHOR_WITH_ID=3</strong></div>
我几乎是对的,但是我无法将变量传递给获取作者姓名的函数。
$comment = preg_replace('/\[\s*QUOTE=(\d+)\s*\]/i', '<div class="quoted"><div class="quotation-author">Originally written by <strong>'.get_comment_author((int)'$1').'</strong></div>', $comment);