def search(self, pattern=None, remote=None, ignorecase=True,
               verbose=False, extra_verbose=False, package_pattern=None):
        if remote:
            remote_proxy = ConanProxy(self._paths, self._user_io, self._remote_manager, remote)
            info = remote_proxy.search(pattern, ignorecase)
        else:
            info = self.file_manager.search(pattern, ignorecase)

        filtered_info = info

        # Filter packages if package_pattern
        if package_pattern:
            try:
                # Prepare ER to be more user natural
                if ".*" not in package_pattern:
                    package_pattern = package_pattern.replace("*", ".*")

                # Compile expression
                package_pattern = re.compile(package_pattern, re.IGNORECASE)
                filtered_info = SearchInfo()
                for conan_ref, packages in sorted(info.items()):
                    filtered_packages = {pid: data for pid, data in packages.items()
                                         if package_pattern.match(pid)}
                    if filtered_packages:
                        filtered_info[conan_ref] = filtered_packages
            except Exception:  # Invalid pattern
                raise ConanException("Invalid package pattern")

        printer = Printer(self._user_io.out)
        printer.print_search(filtered_info, pattern, verbose, extra_verbose)
Redirect to asset/create
dataset/ETHPy150Open conan-io/conan/conans/client/manager.py/ConanManager.search--crossover with--dataset/ETHPy150Open sahana/eden/controllers/asset.py/create