/**过滤HTML里去除img、p、span外的所有标签
* @param str
* @return
* @throws PatternSyntaxException
*/
public static String stringFilter(String str)throws PatternSyntaxException {
String regEx = "(?!<(img|p|span).*?>)<.*?>";
Pattern p_html = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);
Matcher m_html = p_html.matcher(str);
str = m_html.replaceAll("");
return str.trim(); // 返回文本字符串
}