我想设置一个从行中查找时间的模式
String line = "INFO 00:08:39 - End executing test11093 : Next time will be Tue Nov 05 00:13:27 GMT 2013"
Pattern pTime = Pattern.compile("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]");
Matcher mTime = pTime.matcher(line);
String dateTime = null;
while (mTime.find())
{
dateTime = mTime.group();
}
System.out.println(dateTime);
输出是:00:13:27,但我只想得到第一次!