String s1= "[23, 56 ,21,22, 9,?\\/]";
String s2 = s1.replaceAll("[\\[\\]\\s?/\\\\]", ""); System.out.println(s2);//23,56,21,22,9,本文共 185 字,大约阅读时间需要 1 分钟。
String s1= "[23, 56 ,21,22, 9,?\\/]";
String s2 = s1.replaceAll("[\\[\\]\\s?/\\\\]", ""); System.out.println(s2);//23,56,21,22,9,转载于:https://www.cnblogs.com/Struts-pring/p/5127254.html