diff --git a/vtr_flow/scripts/python_libs/vtr/log_parse.py b/vtr_flow/scripts/python_libs/vtr/log_parse.py index 2a217168cd8..623c4545e22 100644 --- a/vtr_flow/scripts/python_libs/vtr/log_parse.py +++ b/vtr_flow/scripts/python_libs/vtr/log_parse.py @@ -23,7 +23,9 @@ class ParsePattern: def __init__(self, name, filename, regex_str, default_value=None): self._name = name self._filename = filename - self._regex = re.compile(regex_str) + # Look for the specified pattern somewhere in the line, but any characters + # can occur before and after it. Detailed in GitHub Issue #2743. + self._regex = re.compile(f'^.*{regex_str}.*$') self._default_value = default_value def name(self): diff --git a/vtr_flow/scripts/python_libs/vtr/parse_vtr_flow.py b/vtr_flow/scripts/python_libs/vtr/parse_vtr_flow.py index 45c927d9867..d500eca0643 100755 --- a/vtr_flow/scripts/python_libs/vtr/parse_vtr_flow.py +++ b/vtr_flow/scripts/python_libs/vtr/parse_vtr_flow.py @@ -36,9 +36,6 @@ def parse_file_and_update_results(filename, patterns, results): with open(filepaths[0], "r") as file: for line in file: - while line[0] == "#": - line = line[1:] - for parse_pattern in patterns: match = parse_pattern.regex().match(line) if match and match.groups():