code: def all_pkgs_by_name_regex(self, regex_name, flags=0):
          
          reg = re.compile(regex_name, flags)
          return [pkg for pkg in self.all_pkgs().keys() if reg.match(pkg)]
docs: Return a list of packages that match regex_name.