2026-03-28 12:19:58 +01:00

12 lines
392 B
Python

import regex
class RegexCellCondition:
def __init__(self, map: dict[str, str]):
self.map = map
def check_on_row(self, row: dict[str, any]):
for apply_coll, condition in self.map.items():
entry_value = row.get(apply_coll).value
if not regex.match(condition, entry_value if entry_value else ""):
return False
return True