10 富文本格式中提取有用字符串 - shuzi323/java-study GitHub Wiki
//将富文本格式转换为String,且String限制在30以内
private static String htmlToString(String html){
html = html.replaceAll("\\s*", "");
html = html.replaceAll(" ", "");
html = html.replaceAll("<\\S+?>", "");
int strLen = html.length();
html = html.substring(0, 30<=strLen?30:strLen);
return html;
}