def decorator(function): function = PluginFunction(function) regex2 = re.compile(regex, flags) function.add_regex(regex2) return function
def decorator(function): function = PluginFunction(function) for regex in regexes: function.add_regex(regex) return function