parent
e44bfa1c36
commit
2cb3f67b74
|
@ -87,7 +87,7 @@
|
||||||
filterBaseString(baseString) {
|
filterBaseString(baseString) {
|
||||||
// Regex from https://stackoverflow.com/a/3561711/
|
// Regex from https://stackoverflow.com/a/3561711/
|
||||||
const regexSafeAlphabet = this.alphabet.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
const regexSafeAlphabet = this.alphabet.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||||
return baseString.replace(new RegExp(`[^${regexSafeAlphabet}]`), "");
|
return baseString.replace(new RegExp(`[^${regexSafeAlphabet}]`, "g"), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue