'分隔符不得为字母数字或反斜杠'和preg_replace()

时间:2015-03-11 19:06:39

标签: php preg-replace

这个正则表达式出了什么问题?

$pattern = '/(\d+)\s(\w+)(\[\d+\]).zip/';
$replace = '$3';
$name = preg_replace($name, $pattern, $replace);

当我尝试执行此代码时,我收到此错误:

Delimiter must not be alphanumeric or backslash
preg_replace()

中的

0 个答案:

没有答案