qq_我_146
2017-01-05 15:49
<?php
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
$P='/my\s+email\s+is\s+(\w+@\w+\.\w+)/';(\s不是表示空字符吗啊换这种写法也是错的啊'/my email is (【\w+】@\w+\.\w+)/')为什么啊
preg_match($p, $subject, $matches);
echo $matches[1];
为什么会报错啊?Notice: Undefined variable: p in /26/562/J3c4/index.php on line 5
Warning: preg_match(): Empty regular expression in /26/562/J3c4/index.php on line 5
这里区分了大小写
Undefined variable: p
PHP进阶篇
181906 学习 · 2654 问题
相似问题