Get the dynamic paramteres from route string.
970717
protected static function dynamic($route)
    {
        $parms = [];
        $param = '';
        $open = false;
        //
        for ($i = 0; $i < Strings::length($route); $i++) {
            if ($open && $route[$i] != '}') {
                $param .= $route[$i];
            }
            //
            if ($route[$i] == '{' && !$open) {
                $open = true;
            } //
            elseif ($route[$i] == '}' && $open) {
                $open = !true;
                $parms[] = $param;
                $param = '';
            }
        }
        //
        return $parms;
    }
1051654
public static List<String> extractParameters(String rawRoute) {
        List<String> list = new ArrayList<>();

        Matcher m = PATH_PARAMETER_REGEX.matcher(rawRoute);

        while (m.find()) {
            if (m.group(1).indexOf('<') != -1) {
                // Regex case name<reg>
                list.add(m.group(1).substring(0, m.group(1).indexOf('<')));
            } else if (m.group(1).indexOf('*') != -1) {
                // Star case name*
                list.add(m.group(1).substring(0, m.group(1).indexOf('*')));
            } else if (m.group(1).indexOf('+') != -1) {
                // Plus case name+
                list.add(m.group(1).substring(0, m.group(1).indexOf('+')));
            } else {
                // Basic case (name)
                list.add(m.group(1));
            }
        }

        return list;
    }
561264
private function replaceDynamicArgs(string $vars, Route $route, array $args) : string
    {
        return preg_replace_callback('`<([A-Za-z_0-9]+)>`', function ($match) use ($route, $args) {
            if (!isset($args[$match[1]])) {
                throw new \InvalidArgumentException(sprintf(
                    "Invalid route name '%s', missing dynamics controller param '%s'",
                    $route->getName(),
                    $match[1]
                ));
            }

            return str_replace('/', '\\', $args[$match[1]]);
        }, $vars);
    }
796518
function getRoute(route) {
                for (var key in settings.routes) {
                    if (key === route) {
                        return settings.routes[key];
                    }
                }
            }
632639
private function getParams($currentPath, $route)
    {
        $path = substr($currentPath, strlen($route));
        $path = (substr($path, 0, 1) == "/") ? substr($path, 1) : $path;
        $path = (substr($path, -1) == "/") ? substr($path, 0, -1) : $path;

        $this->getFilterParams($path);
        $this->getDataParams();
        $this->parseParameterValues();
        $this->cleanReservedParams();
    }
430590
private function transformRouteVariables(string $route, array $variables) : string
    {
        list($valueToReplace, , $parametersVariables) = array_pad(
            $variables,
            3,
            null
        );

        if (isset($parametersVariables)) {
            return str_replace(
                $valueToReplace,
                '('.reset($parametersVariables).')',
                $route
            );
        }

        return str_replace($valueToReplace, '([^/]+)', $route);
    }
285786
private function getRoutesFromIndex (&$routes, &$routesIndex, &$requestMethod, &$requestPathParts, $requestPathIndex = 0) {
        if (!empty($requestPathParts[$requestPathIndex])) {
            $requestPathPart = $requestPathParts[$requestPathIndex];
            if (array_key_exists($requestPathPart, $routesIndex)) {
                $this->getRoutesFromIndex($routes,$routesIndex[$requestPathPart], $requestMethod, $requestPathParts, $requestPathIndex + 1);
            }
            if (array_key_exists(self::ROUTE_PARAMETER_WILDCARD, $routesIndex)) {
                $this->getRoutesFromIndex($routes,$routesIndex[self::ROUTE_PARAMETER_WILDCARD], $requestMethod, $requestPathParts, $requestPathIndex + 1);
            }
        }
        else if (array_key_exists(self::ROUTE_ACTIONS_KEY, $routesIndex)) {
            $testRoutes = &$routesIndex[self::ROUTE_ACTIONS_KEY];
            if (array_key_exists($requestMethod, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[$requestMethod], $requestMethod,$requestPathParts);
            }
            if (array_key_exists(self::ROUTE_GENERIC_METHOD, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[self::ROUTE_GENERIC_METHOD], $requestMethod, $requestPathParts);
            }
        }

        if (array_key_exists(self::ROUTE_GENERIC_ACTIONS_KEY, $routesIndex)) {
            $testRoutes = &$routesIndex[self::ROUTE_GENERIC_ACTIONS_KEY];
            if (array_key_exists($requestMethod, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[$requestMethod], $requestMethod, $requestPathParts);
            }
            if (array_key_exists(self::ROUTE_GENERIC_METHOD, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[self::ROUTE_GENERIC_METHOD], $requestMethod, $requestPathParts);
            }
        }
    }
1172450
function routeIsActive(pathname, routes, params) {
  var remainingPathname = pathname,
      paramNames = [],
      paramValues = [];

  // for...of would work here but it's probably slower post-transpilation.
  for (var i = 0, len = routes.length; i < len; ++i) {
    var route = routes[i];
    var pattern = route.path || '';

    if (pattern.charAt(0) === '/') {
      remainingPathname = pathname;
      paramNames = [];
      paramValues = [];
    }

    if (remainingPathname !== null && pattern) {
      var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
      if (matched) {
        remainingPathname = matched.remainingPathname;
        paramNames = [].concat(paramNames, matched.paramNames);
        paramValues = [].concat(paramValues, matched.paramValues);
      } else {
        remainingPathname = null;
      }

      if (remainingPathname === '') {
        // We have an exact match on the route. Just check that all the params
        // match.
        // FIXME: This doesn't work on repeated params.
        return paramNames.every(function (paramName, index) {
          return String(paramValues[index]) === String(params[paramName]);
        });
      }
    }
  }

  return false;
}
456331
private function searchRouter($routes) 
    {
        foreach ($routes as $route) {
            if (!preg_match_all('#^' . $route['request'] . '$#', $this->request, $matches, PREG_OFFSET_CAPTURE))
                continue;
            // Rework matches to only contain the matches, not the orig string
            $matches = array_slice($matches, 1);

            // Extract the matched URL parameters (and only the parameters)
            $params = array_map(function ($match, $index) use ($matches) {

                // We have a following parameter: take the substring from the current param position until the next one's position (thank you PREG_OFFSET_CAPTURE)
                if (isset($matches[$index + 1]) && isset($matches[$index + 1][0]) && is_array($matches[$index + 1][0])) {
                    return trim(substr($match[0][0], 0, $matches[$index + 1][0][1] - $match[0][1]), '/');
                } // We have no following parameters: return the whole lot
                else {
                    return (isset($match[0][0]) ? trim($match[0][0], '/') : null);
                }
            }, $matches, array_keys($matches));

            $route['params'] = $params;
            return $route;
        }
        //not exists ...
        return false;
    }
514615
function get(params){
    var path = params.path;
    var config = params.config;

    if (path instanceof Route)
      return path;

    var route;
    // If there is no config specified - it should be a plain route, so we try to reuse it
    if (!config)
      route = plainRoutesByPath[path];

    if (!route && params.autocreate)
    {
      var parseInfo = Object.prototype.toString.call(path) == '[object RegExp]'
        ? { path: path, regexp: path, ast: null, params: [] }
        : parsePath(path);
      route = createRoute(parseInfo, config);
      allRoutes.push(route);

      if (route instanceof ParametrizedRoute == false)
        plainRoutesByPath[path] = route;

      if (typeof currentPath == 'string')
      {
        var flags = route.processLocation_(currentPath);

        if (flags & ROUTE_ENTER)
          routeEnter(route);
        if (flags & ROUTE_MATCH)
          routeMatch(route);
      }
    }

    return route;
  }
1333824
function getUrlParameters() {
        var params = [ "allume" ];
        location.search.substr(1).split("&").forEach(function (part) {
            if (!part) return;
            var item = part.split("=");
            params.push(decodeURIComponent(item[0]));
        });
        return params;
    }
980325
private static String getUrlParameters(
        final Collection<Pair<String,String>> parameters, 
        final boolean formEncoding)
        {
        final StringBuilder sb = new StringBuilder ();
        final Iterator<Pair<String,String>> i = parameters.iterator ();
        
        if (i.hasNext ())
            {
            final Pair<String,String> first = i.next ();
            
            sb.append ('?');
            sb.append (getKeyValuePair (first, formEncoding));
            
            while (i.hasNext ())
                {
                final Pair<String,String> current = i.next ();
                
                sb.append ('&');
                sb.append (getKeyValuePair (current, formEncoding));
                }
            
            return sb.toString ();
            }
        else
            {
            return sb.toString ();
            }
        }
41991
def _getParameters(self):
        """"""
        param = self.query._getParameters()                   
        param[self.__key] =  self.__value
        return param
436311
def get_routes(self, viewset):
        
        routes = super(DynamicRouter, self).get_routes(viewset)
        routes += self.get_relation_routes(viewset)
        return routes
817239
protected static function funcGet($route)
    {
        $params = self::dynamic($route);
        //
        if (count($params) > 0) {
            return 'get(\''.$route.'\',function('.self::formatParams($params).')';
        } else {
            return 'get(\''.$route.'\',function()';
        }
    }
61910
function _dynamicEnding() {

  // If the route ends with a dynamic segment, make sure the earlier
  // segments match.
  if(_routeBoom[_routeBoom.length - 1] === '**') {

    dbug('Found dynamic ending on ' + _routeBoom.join('/'));

    var oldLength = _locationBoom.length;   // Save the current length for comparison later

    for(var f = _locationBoom.length - 1; f >= 0; f--) {
      if(_locationBoom[f] === _routeBoom[_routeBoom.length - 2] || _routeBoom[_routeBoom.length - 2] === "*") {
        _locationBoom.splice(f, _locationBoom.length - f);  // Remove the ending segments
        _routeBoom.splice(_routeBoom.length - 1, 1);        // Remove the **
        break;
      } 
    }

    // If location_boom never gets truncated, then this isn't the right route
    if(oldLength === _locationBoom.length) return false;
  }

  return true; 
}
347045
public function getRouteParams()
    {
        if (empty($this->routeParams)) {
            $this->routeParams = Base::instance()->get('PARAMS');
            unset($this->routeParams[0]);
        }

        return $this->routeParams;
    }