酷!學園
技術討論區 => 程式討論版 => PHP程式設計討論區 => 主題作者是: shinhrn 於 2015-10-19 15:51
-
$emailstr=' b@b.com 123456789012345678 b.bb@bbb.com ';
$pattern = '/([a-zA-Z0-9]+[_.+-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-.]?)+[a-zA-Z0-9]+/';
if (preg_match_all($pattern, $emailstr, $matches)){
foreach($matches[0] as $email) {
echo $email,'<BR>';
}
}
找不出匹配???
$emailstr=' b@b.com 12345678901234567 b.bb@bbb.com ';
就可以...請問各位大大這是什麼原因阿?