首页 > 技术文章 > 转载 —java去掉富文本的html标签方法

chenyameng 2020-08-11 11:47 原文

转载 —java去掉富文本的html标签方法

Java去掉Html标签的方法

content = content.replaceAll("\\&[a-zA-Z]{1,10};", "").replaceAll("<[^>]*>", "").replaceAll("[(/>)<]", "");

推荐阅读