Java tutorial
//package com.java2s; public class Main { public static String htmlToPlainString(String str) { if (str == null) { return ""; } String retValue = str; retValue = retValue.replaceAll("<br/>", "\n"); retValue = retValue.replaceAll(" ", " "); retValue = retValue.replaceAll(" ", " "); retValue = retValue.replaceAll("´", "`"); // retValue = retValue.replaceAll("'", "\'"); retValue = retValue.replaceAll("\\'", "\'"); retValue = retValue.replaceAll(""", "\""); retValue = retValue.replaceAll(">", ">"); retValue = retValue.replaceAll("<", "<"); retValue = retValue.replaceAll("&", "&"); return retValue; } }