From e68e3054e7788a04471f7230a32c9daf980295eb Mon Sep 17 00:00:00 2001 From: Ven0m0 <82972344+Ven0m0@users.noreply.github.com> Date: Sun, 1 Mar 2026 06:32:17 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Optimize=20RegExEscape=20in=20Citra?= =?UTF-8?q?ConfigHelpers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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") } ; ============================================================================