From 5ff8a5b1d59dd95ae8c0a79decb2714ee38e9cf8 Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Wed, 23 Jul 2025 09:59:09 +0800 Subject: [PATCH] Use compiled regex Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Calculator/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index 2894c2159..b972394a4 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -24,7 +24,7 @@ namespace Flow.Launcher.Plugin.Calculator @"[ei]|[0-9]|0x[\da-fA-F]+|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" + @")+$", RegexOptions.Compiled); private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled); - private static readonly Regex ThousandGroupRegex = new Regex(@"\B(?=(\d{3})+(?!\d))"); + private static readonly Regex ThousandGroupRegex = new Regex(@"\B(?=(\d{3})+(?!\d))", RegexOptions.Compiled); private static readonly Regex NumberRegex = new Regex(@"[\d\.,]+", RegexOptions.Compiled); private static Engine MagesEngine;