const a = '你好' //用户输入的字符串 const regstr = [",...a,"].join('.*') const reg = new RegExp(regstr) console.log(reg.test('ni你hao好')) //待匹配的字符型
本文标题:模糊查询
本文链接:https://www.haomeiwen.com/subject/zgecdctx.html
网友评论