From 6d6e1330d1710d2feafb0d01b27ff8eab4f78e57 Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Sun, 26 Dec 2021 23:12:08 +0000 Subject: [PATCH] Make the regex search even stupider (aka catch more) --- relaystatus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relaystatus.py b/relaystatus.py index 961e442..2cf6609 100644 --- a/relaystatus.py +++ b/relaystatus.py @@ -21,7 +21,7 @@ for new_relay in relays: eol = "no" contact = "" if "contact" in new_relay: - test = re.search("([a-zA-Z0-9_.+-]+(\[\]|\@|at)[a-zA-Z0-9-.]+\.[a-zA-Z0-9-.]+)", new_relay["contact"], re.IGNORECASE) + test = re.search("(([a-z0-9-._+\(\) ])+([\[\]\(\)\@]|at)+((?!example)[a-z0-9-. ])+(\.|dot *)[a-z0-9_.]+)", new_relay["contact"], re.IGNORECASE) if test: contact = ", contact: " + test.group(1) if not re.search("0.3.5|0.4.5|0.4.6|0.4.7", new_relay["platform"], re.IGNORECASE):