【发布时间】:2012-05-18 10:17:12
【问题描述】:
我有一个这样的字符串
{{ some text @ other text @ and some other text }} @ this should not be replaced {{ but this should: @ }}
我希望它变成
{{ some text ### other text ### and some other text }} @ this should not be replaced {{ but this should: ### }}
我想这个例子很简单,我不确定我能否更好地用文字解释我想要实现的目标。
我尝试了几种不同的方法,但都没有奏效。
【问题讨论】:
标签: php regex preg-replace pcre