From e1123d8a6a1e7814b960e07bbbdd1c9b0b721da3 Mon Sep 17 00:00:00 2001 From: levcovenant <42414087+levcovenant@users.noreply.github.com> Date: Tue, 3 Mar 2020 17:03:35 +0200 Subject: [PATCH] fixed error with regex on python3.7 source: https://github.com/joepie91/python-whois/issues/142 --- pythonwhois/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index b525ebb..c492a62 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -203,7 +203,7 @@ def precompile_regexes(source, flags=0): def preprocess_regex(regex): # Fix for #2; prevents a ridiculous amount of varying size permutations. - regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\s*(?P<\1>\S.*)", regex) + regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\\s*(?P<\1>\\S.*)", regex) # Experimental fix for #18; removes unnecessary variable-size whitespace # matching, since we're stripping results anyway. regex = re.sub(r"\[ \]\*\(\?P<([^>]+)>\.\*\)", r"(?P<\1>.*)", regex)