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