From 994ca7e1e768770a069a3efb4111e48598daaf26 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 17 Nov 2023 00:24:05 +1100 Subject: [PATCH] fix: Typo in regex --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 775a7e4..f992473 100644 --- a/main.py +++ b/main.py @@ -104,7 +104,7 @@ def add_link(): if not (url.startswith('http://') or url.startswith('https://')): url = 'https://' + url - regexmatch = re.match(r"^^https?://([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+(-[a-z0-9]+)*)(/([a-z0-9.])+(-([a-z0-9.])+)?)*$", domain) + regexmatch = re.match(r"^https?://([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+(-[a-z0-9]+)*)(/([a-z0-9.])+(-([a-z0-9.])+)?)*$", domain) if not regexmatch: return error('Invalid domain')