List of utility methods to do HTML Element Remove
String | RemoveHtmlTag(String html) Remove Html Tag Matcher m = patternHtml.matcher(html); while (m.find()) { html = m.replaceAll(""); return html; |
String | RemoveImgTag(String html) Remove Img Tag Matcher m = patternImg.matcher(html); while (m.find()) { html = m.replaceAll(""); return html; |
String | RemoveVideoTag(String html) Remove Video Tag Matcher m = patternVideo.matcher(html); while (m.find()) { html = m.replaceAll(""); return html; |
String | removeHtml(String text) Remove HTML from a string. return text.replaceAll("<[^>]+>", ""); |
String | delHTMLTag(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); ... |