

def __init__(self, regex, strs_datasource, name=None):
    if (not hasattr(regex, 'pattern')):
        self.regex = re.compile(regex, re.I)
    else:
        self.regex = regex
    super().__init__(self.regex.match, strs_datasource, name=name)

dataset/ETHPy150Open wiki-ai/revscoring/revscoring/datasources/meta/filters.py regex_matching.__init__/original