Android examples for java.util.regex:HTML Pattern
remove Img Tag using regex
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { static final Pattern patternImg = Pattern .compile("<img(.+?)src=\"(.+?)\"(.+?)(onload=\"(.+?)\")?([^\"]+?)>"); public static String removeImgTag(String html) { Matcher m = patternImg.matcher(html); while (m.find()) { html = m.replaceAll(""); }/* w ww. j a va 2 s . com*/ return html; } }