匹配日期

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);
不积跬步,无以至千里;不积小流,无以成江海。
原文地址:https://www.cnblogs.com/lovedaodao/p/9239480.html