JAVA时间字符串去空格、冒号和横杠


String date = "2017-09-19 14:40:01";
String response = date.replaceAll("[[\\s-:punct:]]","");


你可能感兴趣的:(java)