81,092
社区成员
发帖
与我相关
我的任务
分享
String s="<div>\n<a herf=\"xxx\">\n</div>\n<div>\n<input xxxx>\n</div>\n<div>\n<input xxxx>\n</div>";
Matcher m=Pattern.compile("<div>([\\s\\S]*?)(<a herf=){1}([\\s\\S]*?)</div>").matcher(s);
while(m.find())
System.out.println(m.group());