Skip to content

Commit

Permalink
Reverting changes in PR ##2391.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenBlack committed Jul 27, 2023
1 parent a3f2020 commit 1892e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions updateHostsFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def normalize_response(
"""
first try: IP followed by domain
"""
regex = r"^\s*(\d{1,3}\.){3}\d{1,3}\s+((?:\w+\.)+[a-zA-Z]+)(.*)"
regex = r"^\s*(\d{1,3}\.){3}\d{1,3}\s+([\w\.-]+[a-zA-Z])(.*)"
result = re.search(regex, rule)

if result:
Expand Down Expand Up @@ -1090,7 +1090,7 @@ def normalize_response(
"""
# deny any potential IPv6 address here.
if ":" not in rule:
regex = r"^\s*((?:\w+\.)+[a-zA-Z]+)(.*)"
regex = r"^\s*([\w\.-]+[a-zA-Z])(.*)"
result = re.search(regex, rule)

if result:
Expand Down

0 comments on commit 1892e80

Please sign in to comment.