def FindRegex(self, regex, data):
    """Search the data for a hit."""
    for match in re.finditer(regex, data, flags=re.I | re.S | re.M):
      yield (match.start(), match.end())
Search the data for a hit.