有时候我们需要在html代码中获取到文本内容,需要把html代码中的标签过滤掉
String htmlStr="html代码"; htmlStr = htmlStr.replaceAll("<[.[^<]]*>", "");