String result = "<td class=\"name\">是否保本</td>";
//匹配<td></td>
Pattern p = Pattern.compile("(<td class=\"name\">[^<]+</td>)|(<td class=\"value\">[^<]+</td>)");
Matcher mather = p.matcher(result);
while(mather.find()) {
String temp = mather.group(); //替换<td></td>后的结果
temp = temp.replaceAll("(<td[^>]+>)|(</td>)", "");
System.out.println(temp);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货