/*$str 为输入、输出字符串变量*/ preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $str, $matches); $str = join('', $matches[0]);
/*$str 为输入、输出字符串变量*/ preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $str, $matches); $str = join('', $matches[0]);
转载于:https://www.cnblogs.com/qingsong/p/9250968.html