php正则字符串提取汉字 /*$str 为输入、输出字符串变量*/ preg_match_all('/[x{4e00}-x{9fff}]+/u', $str, $matches); $str = join('', $matches[0]);