PHP正則應用03 —— 匹配單詞hi

// 匹配單詞hi 計算有多少個單詞hiweb $str = 'hi his is this hi history sthisdd'; $patt = '/\bhi\b/'; preg_match_all($patt,$str,$src); var_dump($src); /* array (size=1) 0 => array (size=2) 0 => stri
相關文章
相關標籤/搜索