Java String去除HTML标签

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wei11556/article/details/70598989
public  String RmHtml(String s) {
    if (!s.equals("") || s != null) {
        String str = s.replaceAll("<[.[^<]]*>", "");
        return str;
    } else {
        return s;
    }
}

猜你喜欢

转载自blog.csdn.net/wei11556/article/details/70598989