modify key command

This commit is contained in:
Jay
2018-07-14 00:19:33 +08:00
parent 8b75f41d55
commit 5755b465cb
2 changed files with 69 additions and 3 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ const parseCMD = async (text = '', source = {}) => {
for (let i of obj) {
txt += (txt.length > 0 ? '|' : '') + i.key
}
regex = new RegExp(`(${txt})`)
regex = new RegExp(`^(${txt})$`)
console.log(regex)
let m = text.match(regex)
console.log('match :::: ', m)