fledermaus/table_handler/commands/regex_edit_col.py
2026-03-13 16:47:31 +01:00

11 lines
305 B
Python

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))