diff --git a/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk b/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk index a7aa9ea..48a40fc 100644 --- a/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk +++ b/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk @@ -18,11 +18,7 @@ ; Escaped string safe for use in regex patterns ; ============================================================================ RegExEscape(str) { - static specials := "()[]{}?*+|^$.\" - out := "" - for char in StrSplit(str) - out .= InStr(specials, char) ? "\" char : char - return out + return RegExReplace(str, "([\\()\[\]{}?*+|^$.])", "\$1") } ; ============================================================================