code: def greplines(pattern, lines):
      
      res = []
      for line in lines:
          match = re.search(pattern, line)
          if match is not None:
              res.append(line)
      return res
docs: Given a list of strings *lines* return the lines that match
      pattern.