标签:contain reg err exp 判断 匹配 过滤字符 字符 函数返回
var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\‘)(\")(\,)(\.)(\/)(\<)(\>)(\?)(\)]+/);
return ( containSpecial.test(s) ); 判断是否含yon
var filterRule= /[^0-9a-zA-Z_]/g;
var judge= filterRule.test(str); //判断传进来的数据是否含有特殊字符。test函数返回匹配结
标签:contain reg err exp 判断 匹配 过滤字符 字符 函数返回
原文地址:http://www.cnblogs.com/benpaodexiaopangzi/p/6230934.html