Merge branch 'master' into release
This commit is contained in:
commit
f52d8a2696
@ -73,8 +73,8 @@ const parseCMD = async (text = '', source = {}) => {
|
||||
let txt = ''
|
||||
console.log('obj ::: ', obj)
|
||||
for (let i of obj) {
|
||||
i.key = i.key.replace(/(\+|\[|\]|\*|\$|\^|\(|\))/g, '\\$1')
|
||||
txt += (txt.length > 0 ? '|' : '') + i.key
|
||||
let key = i.key.replace(/(\+|\[|\]|\*|\$|\^|\(|\))/g, '\\$1')
|
||||
txt += (txt.length > 0 ? '|' : '') + key
|
||||
}
|
||||
regex = new RegExp(`^(${txt})$`)
|
||||
console.log(regex)
|
||||
|
Loading…
Reference in New Issue
Block a user