code: def _search_archive(pattern, archive, verbosity=0, interactive=True):
      
      grep = util.find_program("grep")
      if not grep:
          msg = "The grep(1) program is required for searching archive contents, please install it."
          raise util.PatoolError(msg)
      tmpdir = util.tmpdir()
      try:
          path = _extract_archive(archive, outdir=tmpdir, verbosity=-1)
          return util.run_checked([grep, "-r", "-e", pattern, "."], ret_ok=(0, 1), verbosity=1, cwd=path)
      finally:
          shutil.rmtree(tmpdir, onerror=rmtree_log_error)
docs: Search for given pattern in an archive.