diff --git a/public/scripts/extensions/regex/engine.js b/public/scripts/extensions/regex/engine.js index 8ce8fe2e5..57d0e2517 100644 --- a/public/scripts/extensions/regex/engine.js +++ b/public/scripts/extensions/regex/engine.js @@ -139,10 +139,10 @@ function runRegexScript(regexScript, rawString, { characterOverride } = {}) { */ function filterString(rawString, trimStrings, { characterOverride } = {}) { let finalString = rawString; - for (const trimString of trimStrings) { + trimStrings.forEach((trimString) => { const subTrimString = substituteParams(trimString, undefined, characterOverride); finalString = finalString.replaceAll(subTrimString, ''); - } + }); return finalString; }