請問大神,問題在哪
<?php $subject = "my email is [email protected]"; $pattern='/\s(\w+)@(\w+)\.(com|cn)/'; preg_match($pattern,$subject,$matches); print_r($matches[0]); //在這里補充代碼,實現正則匹配,并輸出郵箱地址 $subject = "my email is [email protected]";
<?php $subject = "my email is [email protected]"; $pattern='/\s(\w+)@(\w+)\.(com|cn)/'; preg_match($pattern,$subject,$matches); print_r($matches[0]); //在這里補充代碼,實現正則匹配,并輸出郵箱地址 $subject = "my email is [email protected]";
2015-04-12
舉報
2015-04-14
這是對的,匹配出的就是郵箱地址!