1 /** 2 * 对字符串做预处理 3 * s 匹配空格、制表符、换页符等空白字符 4 */ 5 public static String pretreatString(String str) { 6 return str.replaceAll("\s*", ""); 7 }