code: def search(lines, pattern):
      
      p = pattern.replace("*", ".*")
      test = re.compile(p)
      result = []
      for l in lines:
          if test.search(l):
              result.append(l)
      return result
docs: return all lines that match the pattern
      #TODO: we need an example
      
      :param lines: 
      :param pattern: 
      :return: