String date = "2017-09-19 14:40:01";
String response = date.replaceAll("[[\\s-:punct:]]","");
//结果:20170919144001
05-07
2419
String date = "2017-09-19 14:40:01";
String response = date.replaceAll("[[\\s-:punct:]]","");
//结果:20170919144001