Skip to content

Commit

Permalink
Fix code scanning alert no. 102: Inefficient regular expression
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
bewake24 and github-advanced-security[bot] authored Nov 28, 2024
1 parent a2c27f6 commit f4bbf1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion constants/regex.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const nameRegex = /^[A-Za-z]+(?: [A-Za-z]+)*$/;
const phoneRegex = /^\d{10}$/;

const cityRegex =
/^[a-zA-Z\u0080-\u024F]+(?:[.\-'\s]*[a-zA-Z\u0080-\u024F]+)*$/;
/^[a-zA-Z\u0080-\u024F]+(?:[.\-'\s][a-zA-Z\u0080-\u024F]+)*$/;

const addressRegex = /^(\d+\s)?[A-Za-z0-9\s,.-]+$/;

Expand Down

0 comments on commit f4bbf1a

Please sign in to comment.