正則表達式
<?php
$subject = "my email is [email protected]";
//在這里補充代碼,實現正則匹配,并輸出郵箱地址
$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
2017-01-05
這里區分了大小寫
2017-01-05
Undefined variable: p