java replace all html tags

Java
str = str.replaceAll("\\<.*?\\>", "");public static String html2text(String html) {
    return Jsoup.parse(html).text();
}
Source

Also in Java: