class T { public static void main(String... args) { String str = "!!!!去符号标号!!当然。!!..**半角"; System.out.println(str); System.out.println(str.replaceAll(" \\p{Punct}", "")); System.out.println(str.replaceAll(" \\pP", "")); } }