过滤特殊字符
public static String fliterSpecialSymbols(String keyword){
String regex = "[_+\\\\=\\[!/!`@#$%^&*()¥……(){}-【】;::\"“”> |、<>《》.。??,,'\\]]";
return keyword.replaceAll(regex, "");
}
JS中过滤特殊字符
function fliterSpecialSymbols(){
var Special_symbols = /[_+=[!\/!`@#$%^&*()¥……(){}-【】;::"“”> |、<>《》.。??,',\\\]]/g;
var keyword = keyword.replace(Special_symbols,"");
}