$str = 'eg5455正則匹配中文123三國殺'; $patten='/[\x{4e00}-\x{9fa5}]+/u'; $a = preg_match($patten, $str, $mn); var_dump($mn[0]);// 打印 '正則匹配中文'
ps: utf8編碼,正則寫在變量裏面,不然要轉義php