Android examples for java.util.regex:HTML Pattern
remove Video Tag using regex
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { static final Pattern patternVideo = Pattern .compile("<object(.+?)>(.*?)<param name=\"src\" value=\"(.+?)\"(.+?)>(.+?)</object>"); public static String removeVideoTag(String html) { Matcher m = patternVideo.matcher(html); while (m.find()) { html = m.replaceAll(""); }//from w w w.ja v a2 s .co m return html; } }