public static String deleteBlank(String string) {
Pattern p = Pattern.compile("\\s*|\t|\r|\n");
Matcher m = p.matcher(string);
String after = m.replaceAll("");
return after;
}
replace("","");
///替换空格为\\空格
public static String convertBlank(String string) {
Pattern p = Pattern.compile("\\s");
Matcher m = p.matcher(string);
String after = m.replaceAll("\\ ");
return after;
}