Skip to content

Commit

Permalink
fixed error with regex on python3.7
Browse files Browse the repository at this point in the history
source: joepie91#142
  • Loading branch information
levcovenant authored Mar 3, 2020
1 parent 1b50bce commit e1123d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pythonwhois/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1123d8

Please sign in to comment.