From 61bc6c6c823b0c2011c9cde8d17e2a011da501db Mon Sep 17 00:00:00 2001 From: Konrad Pettersson <49250602+KonkenBonken@users.noreply.github.com> Date: Sat, 26 Apr 2025 14:39:28 +0200 Subject: [PATCH] Removes unnecessary character classes from phone regex --- static/regex/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/regex/data.json b/static/regex/data.json index 549e55d..c7ad3a8 100644 --- a/static/regex/data.json +++ b/static/regex/data.json @@ -115,7 +115,7 @@ "title": "phone number", "tagline": "match a phone number", "description": "Match a phone number with \"-\" and/or country code.", - "regex": "^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$", + "regex": "^\\+?\\(?[0-9]{3}\\)?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$", "flag": "gmi", "matchText": [ "+919367788755",