String str = "<td><p>aa</p></td> <td><p>bb</p></td>";
Pattern p = Pattern.compile("<td>(.*?)</td>");
Matcher m = p.matcher(str);
if(m.matches()){
System.out.println(m.group());
}都用了(.*?)了还是匹配了整个串
Pattern p = Pattern.compile("<td>(.*?)</td>");
Matcher m = p.matcher(str);
if(m.matches()){
System.out.println(m.group());
}都用了(.*?)了还是匹配了整个串
while(m.find()) {
System.out.println(m.group());
}