Regular Expression
public class RegularExpression { /** * Using in regular expression to find the html start tags and close tags */ public static final String RE_HTML_TAG = "<{1}[^>]{1,}>{1}"; public static void main(String args[]){ String html = "<html pref='xxx'>TEST</html>"; String result = html.replaceAll(RegularExpression.RE_HTML_TAG, ""); System.out.println(result); } }