private function regexUri(string $route): string
    {
        return preg_replace_callback('@{([^}]+)}@', function (array $match) {
            return $this->regexParameter($match[1]);
        }, $route);
    }
private function regexUri(string $route): string
    {
        return preg_replace_callback('@{([^}]+)}@', function (array $match) {
            return $this->regexParameter($match[1]);
        }, $route);
    }
private function regexUri ( string $ route ) : string { return preg_replace_callback ( '@{([^}]+)}@' , function ( array $ match ) { return $ this -> regexParameter ( $ match [ 1 ] ) ; } , $ route ) ; }
Convert route to regex

@param string $route
@return string
Convert route to regex