為什么錯了,結果都一樣?
<?php $subject = "my email is [email protected]"; //在這里補充代碼,實現正則匹配,并輸出郵箱地址 $pattern = '/s(.+)/is'; preg_match($pattern,$subject,$matches); print_r( $matches[1]);?
<?php $subject = "my email is [email protected]"; //在這里補充代碼,實現正則匹配,并輸出郵箱地址 $pattern = '/s(.+)/is'; preg_match($pattern,$subject,$matches); print_r( $matches[1]);?
2017-04-27
舉報
2018-12-27
大神,可以講解下你的式子是如何匹配的嗎
2017-07-05
你需要echo出來的結果是這個郵箱才可以通過
2017-06-21
'/s(.+)/is'會匹配到s開頭,后面有至少一個非換行的字符的結果,不區分大小寫,單行匹配,[email protected]滿足表達式的條件,但這只是碰巧對,前面還匹配了s [email protected]。
2017-04-27
慕課里面代碼要求的是相對匹配,所以你代碼實現效果正確就可以了,知道他還有一個方法也就可以了