diff --git a/util/Util.js b/util/Util.js index 82320ae..e8f3367 100644 --- a/util/Util.js +++ b/util/Util.js @@ -128,7 +128,7 @@ class Util { * @return {string} The sanitised expression * @memberof Util */ - static sanitiseRegex(input, allowed = ['?', '\\', '(', ')', '|']) { + static sanitiseRegex(input, allowed = ['?', '\\', '(', ')', '|', '\\[', '\\]', '.']) { if (!input) throw new Error('Missing input'); const reg = new RegExp(`[${this.regChars.filter((char) => !allowed.includes(char)).join('')}]`, 'gu'); return input.replace(reg, '\\$&');