private function findMatches(string $method, string $uri, string $prefix = ""): ParsedRoute
    {
        if (isset($this->routes[strtoupper($method)])) {
            foreach (array_keys($this->routes[strtoupper($method)]) as $route) {
                $parsed_regexp = $this->prepareRouteRegexp($prefix.$route);
                if (preg_match_all("/^".$parsed_regexp.($this->trailing_slash_check ? "" : "\/?")."$/i", $uri, $matches, PREG_SET_ORDER)) {
                    if (count($matches)) {
                        $matches = array_diff_key($matches[0], range(0, count($matches[0])));
                    }
                    return new ParsedRoute($this->routes[strtoupper($method)][$route], $matches);
                }
            }
        }
        throw new RouteNotFoundException("No route for '{$uri}' found");
    }