src/Route/RouteBase.php
public static function stripAttributes($routeString, &$route, $withParameters = true)
    {
        $route['query'] = [];
        $route['fragment'] = '';
        $route['parameters'] = [];
        $regex = '/^(.*?)(?:\?([^?#]*))?(?:#([^#?]*))?$/';
        preg_match($regex, $routeString, $matches);
        if (isset($matches[2])) {
            parse_str($matches[2], $query);
            $route['query'] = $query;
        }
        if (isset($matches[3])) {
            $route['fragment'] = $matches[3];
        }
        if ($withParameters) {
            // TODO: implement
        }
        return $matches[1];
    }
public static function stripAttributes($routeString, &$route, $withParameters = true)
    {
        $route['query'] = [];
        $route['fragment'] = '';
        $route['parameters'] = [];
        $regex = '/^(.*?)(?:\?([^?#]*))?(?:#([^#?]*))?$/';
        preg_match($regex, $routeString, $matches);
        if (isset($matches[2])) {
            parse_str($matches[2], $query);
            $route['query'] = $query;
        }
        if (isset($matches[3])) {
            $route['fragment'] = $matches[3];
        }
        if ($withParameters) {
            // TODO: implement
        }
        return $matches[1];
    }
public static function stripAttributes ( $ routeString , & $ route , $ withParameters = true ) { $ route [ 'query' ] = [ ] ; $ route [ 'fragment' ] = '' ; $ route [ 'parameters' ] = [ ] ; $ regex = '/^(.*?)(?:\?([^?#]*))?(?:#([^#?]*))?$/' ; preg_match ( $ regex , $ routeString , $ matches ) ; if ( isset ( $ matches [ 2 ] ) ) { parse_str ( $ matches [ 2 ] , $ query ) ; $ route [ 'query' ] = $ query ; } if ( isset ( $ matches [ 3 ] ) ) { $ route [ 'fragment' ] = $ matches [ 3 ] ; } if ( $ withParameters ) { // TODO: implement } return $ matches [ 1 ] ; }
Strip fragment, query and optionally parameters from a route string.

@param string $routeString The route string.
@param array $route A route array to insert attributes into.
@param bool $withParameters Whether to also read parameters from the
route string.
@return string The route string without attributes.
Strip fragment query and optionally parameters from a route string .