$res=array();$str="你好aaaaa啊" preg_match_all("/[\x{4e00}-\x{9fa5}]+/u",$str,$res); var_dump($res); //輸出//array(1) { [0]=> array(2) { [0]=> string(6) "你好" [1]=> string(3) "啊" } }