IOTesting #19

Merged
mysticmomba merged 22 commits from IOTesting into master 2025-09-05 11:02:43 -04:00
Showing only changes of commit 52efd6c2fd - Show all commits
+5 -4
View File
@@ -142,11 +142,12 @@ def inspect_parquet(path):
def regulator(paths, case_insensitive=True):
"""
Build a Python raw string regex that matches any of the given Windows path fragments.
Build a regex pattern that matches any of the given Windows path fragments.
"""
escaped = [re.escape(p) for p in paths]
pattern = "(?:" + "|".join(escaped) + ")"
if case_insensitive:
pattern = pattern
print(f"Regulator is providing {pattern}")
return f'r"{pattern}"'
pattern = "(?i)" + pattern # Add inline case-insensitive flag
print(f"Regulator is providing: {pattern}")
return pattern