如果我有一个字符串,它看起来像my name is {your name here} and I am from {country}.
我想使用的preg_replace删除{content}
因此字符串结束为my name is and I am from .
PHP预浸更换::正则表达式
但我不能工作了正则表达式模式。
有人可以帮我吗?
my name is and I am from .
只是一个示例字符串。
它可以像the current date is {current date} in {suburb}
我很好奇..什么是这一点?字符串“”我的名字是什么,我来自哪里?“”有什么价值? – drudge 2010-10-26 23:01:17
由于{content}实际上是模板中的关键字,所以它们会在用户输入文本框时填充。但是当他们还没有输入任何内容时,我不想让{content}显示;) – Hailwood 2010-10-26 23:04:31