去除字符串中的标点和空格,将纯文本保存到一个新数组,且统一大小写

var newStr = str.replace(/\s/g,"").replace(/[^a-zA-Z0-9]/g,"").toLowerCase(); 
发布了39 篇原创文章 · 获赞 0 · 访问量 410

猜你喜欢

转载自blog.csdn.net/weixin_43912756/article/details/105558155