日期:2014-05-17  浏览次数:20614 次

字符串去除html标签

            content=content.replaceAll("</?[^>]+>","");   //剔出了<html>的标签
            content=content.replace("&nbsp;","");
            content=content.replace(".","");
            content=content.replace("\"","‘");
            content=content.replace("'","‘");
            [color=darkred]
content=content.replaceAll("\\s*|\t|\r|\n","");//去除字符串中的空格,回车,换行符,制表符
[/color][size=medium][/size][align=center][/align]