Android examples for java.lang:String HTML
Removes all html tags from a String via regex and trims the resulting string.
public class Main{ /**/*from w w w . j ava2 s .c o m*/ * Removes all html tags from a {@link String} and trims the resulting string. * * @param content String that contains html tags * @return the String without html tags */ public static String removeHtmlTags(String content) { return content.replaceAll("\\<.*?\\>", "").trim(); } }