def METHOD_NAME(self, v, what):  # no access to this from LeoCursor...
    for i in v.b.split('\n'):
        m = self.pattern.match(i)
        if m and m.group(1) == what:
            return True
    return False