// 字符串操作 // 1.去除字符串中的特殊符号 export const clearSymbol = (str: string) => { let string = '' // 替换字符串中的所有特殊字符(包含空格) const Exp = /[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\±\<\≤\>\≥\<\>\[\]?]/g string = str.replace(Exp, '') return string }