From f862204aa1ff03a624d2fa562f583fd1525e3c72 Mon Sep 17 00:00:00 2001 From: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com> Date: Mon, 6 Oct 2025 23:23:14 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 13: Inefficient regular expression Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com> --- src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts b/src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts index 0f3aef3314..0cdb016a87 100644 --- a/src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts +++ b/src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts @@ -59,7 +59,7 @@ const useCalcalulatorByTeaHook = () => { } function onInputRecived(expression: string) { - if (expression.match(/^(?:[0-9]+[-+*/]?)*[0-9]*$/)) { + if (expression.match(/^(?:[0-9]+[-+*/])*[0-9]*$/)) { setCalculationExpression(expression); } }