Android HTML Element Remove RemoveHtmlTag(String html)

Here you can find the source of RemoveHtmlTag(String html)

Description

Remove Html Tag

Declaration

public static String RemoveHtmlTag(String html) 

Method Source Code

//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    static final Pattern patternHtml = Pattern.compile("<.+?>");

    public static String RemoveHtmlTag(String html) {
        Matcher m = patternHtml.matcher(html);
        while (m.find()) {
            html = m.replaceAll("");
        }/*from  ww w  .j av  a  2 s.c o m*/
        return html;
    }
}

Related

  1. RemoveImgTag(String html)
  2. RemoveVideoTag(String html)
  3. removeHtml(String text)
  4. delHTMLTag(String htmlStr)