java去除字符串中的html标签
解决方法:
//去除字符串中的html标签
String newstr ="<span>你好</span>".replaceAll("<[.[^>]]*>","");
newstr = newstr.replaceAll(" ", "");
结果:你好
向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
java去除字符串中的html标签
解决方法:
//去除字符串中的html标签
String newstr ="<span>你好</span>".replaceAll("<[.[^>]]*>","");
newstr = newstr.replaceAll(" ", "");
结果:你好
有建议,请留言!