我尝试使用preg_replace用括号替换括号,除非这些括号位于代码块中
例如:
this is my {text}
And this is <code>if (true) { echo "hello world" }</code>
And also a multine line one
<code>
if (true) { echo "hello world" }
</code>
Another {my super text}
我必须输出:
this is my _text_
And this is <code>if (true) { echo "hello world" }</code>
And also a multine line one
<code>
if (true) { echo "hello world" }
</code>
Another _my super text_
由于