我有一个声明替换在PHP中做(使用str_replace
或其他)。我有这样的句子:str_replace除两个标记之间的/ else
"the sun is yellow when the <wrong>red sun is not yellow</wrong>"
我想这一点:
"the apple is yellow when the <wrong>red sun is not yellow</wrong>"
所以我需要更换一个字,但有两个特定标记(<wrong
和</wrong>
)之间。如何用str_replace
或使用正则表达式来做到这一点?
有点难,不是吗?我已经搜索了很多小时了......没有线索......任何想法?
感谢溶液或线索或帮助
有永远只有一个``部分? –
2011-02-17 11:55:08