
正文
java替换ascii表字符
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
如下:
//处理特殊字符 public String dealSpecialXml(String xml){ String result = ""; //result = xml.replaceAll("", ""); result = xml.replaceAll("[\\x01-\\x1f]", "");// String value = null;// Pattern p = Pattern.compile("[\\x01-\\x1f]");// Matcher m = p.matcher(xml);// result = m.replaceAll(""); //result = HtmlUtils.htmlEscape(result); return result; }







