第1个回答 2016-03-28
String regEx = "<a>([\s\S]*?)</a>";String s = "<a>123</a><a>456</a><a>789</a>";Pattern pat = Pattern.compile(regEx);Matcher mat = pat.matcher(s);boolean rs = mat.find();for(int i=1;i<=mat.groupCount();i++){ System.out.println(mat.group(i));}本回答被提问者和网友采纳