def regex(self, line, regex, error_type=ERROR,
              line_match=None, word_match=None, word_re=None):

        offset = 0

        start, end = self.full_line(line)
        line_text = self.code[start:end]

        if line_match:
            match = re.match(line_match, line_text)

            if match:
                line_text = match.group('match')
                offset = match.start('match')
            else:
                return

        it = re.finditer(regex, line_text)
        results = [
            result.span('mark')
            for result in it
            if word_match is None or result.group('mark') == word_match
        ]

        for start, end in results:
            self.range(line, start + offset, end - start, error_type=error_type)
Dispatch by bytename to the corresponding methods.
dataset/ETHPy150Open SublimeLinter/SublimeLinter3/lint/highlight.py/Highlight.regex--crossover with--dataset/ETHPy150Open nedbat/byterun/byterun/pyvm2.py/VirtualMachine.dispatch