Java去除html标签的正则表达:
- public static String replaceHtml(String html){
- String regEx="<.+?>"; //表示标签
- Pattern p=Pattern.compile(regEx);
- Matcher m=p.matcher(html);
- String s=m.replaceAll("");
- return s;
- }
|
背景:
阅读新闻
相关资讯
Java教程
|
最新资讯
|