php str_replace 替换 空格和换行符 $uuu = preg_replace("/(s| | |xc2xa0)/", "", $str); return str_replace(' ', '', $uuu);