Android Utililty Methods HTML Element Remove

List of utility methods to do HTML Element Remove

Description

The list of methods to do HTML Element Remove are organized into topic(s).

Method

StringRemoveHtmlTag(String html)
Remove Html Tag
Matcher m = patternHtml.matcher(html);
while (m.find()) {
    html = m.replaceAll("");
return html;
StringRemoveImgTag(String html)
Remove Img Tag
Matcher m = patternImg.matcher(html);
while (m.find()) {
    html = m.replaceAll("");
return html;
StringRemoveVideoTag(String html)
Remove Video Tag
Matcher m = patternVideo.matcher(html);
while (m.find()) {
    html = m.replaceAll("");
return html;
StringremoveHtml(String text)
Remove HTML from a string.
return text.replaceAll("<[^>]+>", "");
StringdelHTMLTag(String htmlStr)
del HTML Tag
String regEx_script = "<script[^>]*?>[\\s\\S]*?<\\/script>"; 
String regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; 
String regEx_html = "<[^>]+>"; 
Log.v("htmlStr", htmlStr);
try {
    Pattern p_script = Pattern.compile(regEx_script,
            Pattern.CASE_INSENSITIVE);
    Matcher m_script = p_script.matcher(htmlStr);
...