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