String str = "<script type=\"text/javascript\">";
str+="document.write('<a style=\"display:none!important\" id=\"tanx-a-mm_114791679_13280975_57892040\"></a>');";
str+="tanx_s = document.createElement(\"script\");";
str+="tanx_s.type = \"text/javascript\";";
str+="tanx_s.charset = \"gbk\";";
str+="tanx_s.id = \"tanx-s-mm_114791679_13280975_57892040\";";
str+="tanx_s.async = true;";
str+="tanx_s.src = \"http://p.tanx.com/ex?i=mm_114791679_13280975_57892040\";";
str+="tanx_h = document.getElementsByTagName(\"head\")[0];";
str+="if(tanx_h)tanx_h.insertBefore(tanx_s,tanx_h.firstChild);";
str+="</script>
java正则,匹配不包含某个字符串
最新推荐文章于 2024-07-20 03:26:33 发布
在处理HTML页面内容时,需要去除script标签和HTML标签,以及特定的JS定义。通过Java的正则表达式可以实现这一目标。参考了相关文章,提供了有效的解决方案。
摘要由CSDN通过智能技术生成