我有字符串,它是格式:JAVA正则表达式失败
;1=2011-10-23T16:16:53+0530;2=2011-10-23T16:16:53+0530;3=2011-10-23T16:16:53+0530;4=2011-10-23T16:16:53+0530;
我已经写了下面的代码从(;1=2011-10-23T16:16:53+0530;)
Pattern pattern = Pattern.compile("(;1+)=(\\w+);");
String strFound= "";
Matcher matcher = pattern.matcher(strindData);
while (matcher.find()) {
strFound= matcher.group(2);
}
找到字符串2011-10-23T16:16:53+0530
但预期它不工作。你能给我任何提示吗?
感谢尤金。你的解决方案运行良好 – user613114 2012-02-05 15:12:50