分隔符不得为字母数字或反斜杠及preg_Match。我有个密码:$string1 = "My name is 'Kate' and im fine"; $pattern = "My name is '(.*)' and im fine";
preg_match($pattern , $string1, $matches);echo $matches[1];当我运行时,它返回以下错误:警告:preg_Match()[Function.preg-Match]:分隔符不能是字母数字或反斜杠
3 回答
叮当猫咪
TA贡献1776条经验 获得超12个赞
$pattern = "/My name is '(.*)' and im fine/"; // With / as a delimeter
婷婷同学_
TA贡献1844条经验 获得超8个赞
/something/
'/something/'
/
'
'something'
s
i
'/something/i'
/
'~something~'
泛舟湖上清波郎朗
TA贡献1818条经验 获得超3个赞
$pattern = "/My name is '(.*)' and im fine/";
i
$pattern = "/My name is '(.*)' and im fine/i";
i
- 3 回答
- 0 关注
- 798 浏览
添加回答
举报
0/150
提交
取消