标签:code 字符 log func div rip class var bsp
/*匹配特殊字符*/ function stripscript(s) { var pattern = new RegExp("[-`~!@#$^&*()=|{}‘:;‘,\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“‘。,、?]"); var rs = ‘‘; for (var i = 0; i < s.length; i++) { rs = rs + s.substr(i, 1).replace(pattern,‘‘); } return rs; }
标签:code 字符 log func div rip class var bsp
原文地址:http://www.cnblogs.com/xfdmb/p/6739968.html