import re class RegexEditCol: def __init__(self, match, replace_with): self.match = match self.replace_with = replace_with def execute_on_cell(self, entry) -> str: if entry.value is None: return entry.value return re.sub(self.match, self.replace_with, entry.value)