每日一句 ( 2024920 )  

Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul.

歲月留痕,只及肌膚;激情不再,皺起心靈。———— Samuel Ullman

php正則匹配中文漢字-正則表達(dá)式匹配中文

更新:$str = '這是中文';// 注意 php不支持\u寫法preg_match('/[\x{4e00}-\x{9fa5}]+/u', $str, $matchs);print_r($matchs);==================以下忘了是寫的什么玩意兒==================最近學(xué)習(xí)正則,在百度搜php常用正則,80%都是采集的。其中開頭都介紹了個匹配中文的方法,試了一下,不能用(汗!?。。?。這個方法也是搜集來的,可以正確匹配中文: