java去除字符串时间的横杠、空格、冒号

版权声明:本文为博主原创文章,转载须注明出处,博客地址:https://blog.csdn.net/wx13227855087 https://blog.csdn.net/wx13227855087/article/details/83182961

String Times = " 2018-10-19 14:16:17";

String str = Times.replaceAll("[[\\s-:punct:]]","");

猜你喜欢

转载自blog.csdn.net/wx13227855087/article/details/83182961
今日推荐