Skip to content

Commit f862204

Browse files
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>
1 parent e5e12de commit f862204

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const useCalcalulatorByTeaHook = () => {
5959
}
6060

6161
function onInputRecived(expression: string) {
62-
if (expression.match(/^(?:[0-9]+[-+*/]?)*[0-9]*$/)) {
62+
if (expression.match(/^(?:[0-9]+[-+*/])*[0-9]*$/)) {
6363
setCalculationExpression(expression);
6464
}
6565
}

0 commit comments

Comments
 (0)