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

转自:https://blog.csdn.net/sswh5123/article/details/78029839

  1. String date = "2017-09-19 14:40:01";

  2. String response = date.replaceAll("[[\\s-:punct:]]","");

猜你喜欢

转载自blog.csdn.net/weixin_38427866/article/details/83150498