Smarty删除特定字符串之前的所有字符

时间:2014-12-16 02:53:18

标签: php string preg-replace smarty preg-replace-callback

在php上:

 $string = preg_replace('/^[^,]*,\s*/', '', $input);

聪明地说:

 {$string|preg_replace:"/^[^,]*,\s*/":" "}

不工作...更改为preg_replace_callback?怎么用?

谢谢!

0 个答案:

没有答案