Fix search patterns in Python scripts.

This commit is contained in:
Joshua Rogers 2024-01-05 20:13:17 +07:00
parent 7511505c40
commit ff698f308d
4 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
prev_dest_host = None
if ": " in line or "->[" not in line or not line[-1].isdigit():
if ": " in line or "]->" not in line or not line[-1].isdigit():
continue
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")

View File

@ -19,7 +19,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
line = line.strip()
line = re.sub(r"^\[?\d+\]?\s*", "", line)
if ": " in line or ">" not in line or not line[-2].isdigit() or not line[-1] == ')':
if ": " in line or "]->" not in line or not line[-2].isdigit() or not line[-1] == ')':
continue
pattern = re.compile(r"(\w+)@\(([\d\.:]+)\)(\[[^\]]+\])->(?=(\w+)@\(([\d\.:]+)\))")

View File

@ -37,7 +37,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
prev_dest_host = None
if ": " in line or ">" not in line or not line[-1].isdigit():
if ": " in line or "]->" not in line or not line[-1].isdigit():
continue
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")

View File

@ -46,7 +46,7 @@ def build_lookup_table(input_lines, ignore_dest_user):
prev_dest_host = None
if ":" in line or ">" not in line or not line[-1].isdigit():
if ": " in line or "]->" not in line or not line[-1].isdigit():
continue
pattern = re.compile(r"(\w+)@(\d+\.\d+\.\d+\.\d+)(\[[^\]]+\])->(?=(\w+)@(\d+\.\d+\.\d+\.\d+))")