50,707
社区成员
发帖
与我相关
我的任务
分享
String t="<span><a href=\"xxx\">Hello <span>的wor你<span>ld的</span></span></a></span>";
System.err.println(t.replaceAll("(?<=\\w|\\s|n>|[\\u4E00-\\u9FA5])</?span>", ""));
String t="<span><a href=\"xxx\">Hello <span>wor<span>ld</span></span></a></span>";
System.err.println(t.replaceAll("(?<=\\w|\\s|n>)</?span>", ""));
String s="";
s="<span><a href=\"xxx\">Hello <span>world</span></a></span>".replaceAll("(<a.*?[^>]>.*?)<span>(.*?)</span>", "$1$2");
System.err.println(s);
String s="";
s="<span><a href=\"xxx\">Hello <span>world</span></a></span>".replaceAll("(<a.*?[^>]>.*?)<span>(.*?)</span>", "$1$2");
System.err.println(s);