String date = "2017-09-19 14:40:01"; String response = date.replaceAll("[[\\s-:punct:]]","");
JAVA时间字符串去空格、冒号和横杠
于 2017-09-19 14:40:06 首次发布
String date = "2017-09-19 14:40:01"; String response = date.replaceAll("[[\\s-:punct:]]","");