let ret = "12312ffds#¥@¥#%^&***(()))*)).`@%@¥@¥", val = this.customDeviceName;
//特殊字符过滤
let pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
for (let i = 0; i < val.length; i++) {
ret = ret + val.substr(i, 1).replace(pattern, '');
}
//过滤表情
ret = ret.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "");
console.log("过滤后的文字=",ret);