匹配日期

StringBuilder regEx = new StringBuilder("(\\d{4})(-|\\.|\\\\|年)(\\d{1,2})(-|\\.|\\\\|月)(\\d{1,2})");
String news_times_tmp = "公告时间:2018年06月27日";
String news_times = RegexMatchesUtil.getRegexMatches(regEx.toString(), news_times_tmp);
posted @ 2018-06-28 16:43  亲爱的阿道君  阅读(120)  评论(0编辑  收藏  举报