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());
}
都用了(.*?)了还是匹配了整个串
------解决方案--------------------
你获取的方法不对吧
while(m.find()) {
System.out.println(m.group());
}