Get all parameters from url mask
541578
public function getPlacehodlerParameters(): array
	{
		if (!empty($this->placeholder_order)) {
			return array_filter($this->placeholder_order);
		}

		$return = [];

		preg_replace_callback('/<(\w+)>/', function ($item) use (&$return) {
			$return[] = end($item);
		}, $this->path);

		return $return;
	}
1334189
def _get_path_params(match):
    
    result = {}
    for var_name, value in match.groupdict().iteritems():
      actual_var_name = ApiConfigManager._from_safe_path_param_name(var_name)
      result[actual_var_name] = urllib.unquote_plus(value)
    return result
845530
function(url){

	var retlist = [];

	// Pull parameters.
	var tmp = url.split('?');
	var path = '';
	var parms = [];
	if( ! tmp[1] ){ // catch bad url--nothing before '?'
	    parms = tmp[0].split('&');
	}else{ // normal structure
	    path = tmp[0];
	    parms = tmp[1].split('&');
	}

	// Decompose parameters.
	each(parms, function(p){
	    var c = _first_split('=', p);
	    if( ! c[0] && ! c[1] ){
		retlist.push([p]);
	    }else{
		retlist.push(c);		  
	    }
	});
	
	return retlist;
    }
704400
def getQueryParams(url):
    """"""
    query = urlsplit(url)[3]
    out.debug(u'Extracting query parameters from %r (%r)...' % (url, query))
    return cgi.parse_qs(query)
436261
def passparameters(self):
        """"""
        paramdict = {}
        for parametergroup, params in self.parameters: #pylint: disable=unused-variable
            for parameter in params:
                if parameter.value:
                    if isinstance(parameter.value, list):
                        paramdict[parameter.id] = ",".join(parameter.value)
                    else:
                        paramdict[parameter.id] = parameter.value
        return paramdict
571464
public function get_url_params() {
        $args = array(
            'id' => $this->course->id
        );
        if (!empty($this->instancefilter)) {
            $args['ifilter'] = $this->instancefilter;
        }
        if (!empty($this->rolefilter)) {
            $args['role'] = $this->rolefilter;
        }
        if ($this->searchfilter !== '') {
            $args['search'] = $this->searchfilter;
        }
        if (!empty($this->groupfilter)) {
            $args['filtergroup'] = $this->groupfilter;
        }
        if ($this->statusfilter !== -1) {
            $args['status'] = $this->statusfilter;
        }
        return $args;
    }
1209745
function getUrlParams(path) {
    if (!path) {
      return {};
    }
    var bits = path.split('?');
    var querystring = bits.length > 1 ? bits[1] : '';
    return toObject(querystring);
  }
437288
function parseUrlParams(params) {
    let qs = '';
    let i = 0;
    each(params, (val, key) => {
        if (i > 0) {
            qs += '&amp;';
        }
        qs += key + '=' + val;
        i += 1;
    })
    return qs;
}
970026
def get_arthur_params_from_url(cls, url):
        
        params = {}

        args = cls.get_perceval_params_from_url(url)
        parser = GitLabCommand.setup_cmd_parser()

        parsed_args = parser.parse(*args)

        params['owner'] = parsed_args.owner
        params['repository'] = parsed_args.repository
        # include only blacklist ids information
        params['blacklist_ids'] = parsed_args.blacklist_ids

        return params
1233416
def get_three_parameters(self, regex_exp, parameters):
        
        Rx, Ry, Rz, other = self.get_parameters(regex_exp, parameters)
        if other is not None and other.strip():
            raise iarm.exceptions.ParsingError("Extra arguments found: {}".format(other))
        return Rx.upper(), Ry.upper(), Rz.upper()
193935
function (url) {
        url = _.trimStart(url);
        var pathVariables,
            p = {
                raw: url
            };

        // extract the protocol
        p.protocol = _.get(url.match(regexes.extractProtocol), GET_1);
        _.isString(p.protocol) && (url = url.substr(p.protocol.length + 3)); // remove that damn protocol from url

        // extract the host
        p.host = _.get(url.match(regexes.extractHost), GET_1);

        // if host exists there are a lot you can extract from it
        if (_.isString(p.host)) {
            url = url.substr(p.host.length); // remove host from url

            if ((p.auth = _.get(p.host.match(regexes.extractHostAuth), GET_1))) {
                p.host = p.host.substr(p.auth.length + 1); // remove auth from host
                p.auth = p.auth.split(AUTH_SEPARATOR);
                p.auth = {
                    user: p.auth[0],
                    password: p.auth[1]
                };
            }

            // extract the port from the host
            p.port = _.get(p.host.match(regexes.extractPort), GET_1);
            p.port && (p.host = p.host.substring(0, p.host.length - p.port.length - 1)); // remove port from url

            p.host = _.trim(p.host, DOMAIN_SEPARATOR).split(regexes.splitDomain); // split host by subdomains
        }

        // extract the path
        p.path = _.get(url.match(regexes.extractPath), GET_0);
        if (_.isString(p.path)) {
            url = url.substr(p.path.length);
            p.path && (p.path = p.path.replace(regexes.trimPath, MATCH_1)); // remove leading slash for valid path
            // if path is blank string, we set it to undefined, if '/' then single blank string array
            p.path = p.path ? (p.path === PATH_SEPARATOR ? [E] : p.path.split(PATH_SEPARATOR)) : undefined;
        }

        // extract the query string
        p.query = _.get(url.match(regexes.extractQuery), GET_1);
        _.isString(p.query) && ((url = url.substr(p.query.length + 1)), (p.query = QueryParam.parse(p.query)));

        // extract the hash
        p.hash = _.get(url.match(regexes.extractSearch), GET_1);

        // extract path variables
        pathVariables = _.transform(p.path, function (res, segment) {
            // check if the segment has path variable prefix followed by the variable name.
            if (_.startsWith(segment, PATH_VARIABLE_IDENTIFIER) && segment !== PATH_VARIABLE_IDENTIFIER) {
                res.push({ key: segment.slice(1) }); // remove path variable prefix.
            }
        }, []);
        p.variable = pathVariables.length ? pathVariables : undefined;

        return p;
    }
71670
function getUrlParameter(sPageURL) {
    var url = sPageURL.split('?');
    var obj = {};
    if (url.length == 2) {
      var sURLVariables = url[1].split('&'),
          sParameterName,
          i;
      for (i = 0; i < sURLVariables.length; i++) {
          sParameterName = sURLVariables[i].split('=');
          obj[sParameterName[0]] = sParameterName[1];
      }
      return obj;
    } else {
      return undefined;
    }
}
1313392
def get_p2o_params_from_url(cls, url):
        

        # if the url doesn't contain a filter separator, return it
        if PRJ_JSON_FILTER_SEPARATOR not in url:
            return {"url": url}

        # otherwise, add the url to the params
        params = {'url': url.split(' ', 1)[0]}
        # tokenize the filter and add them to the param dict
        tokens = url.split(PRJ_JSON_FILTER_SEPARATOR)[1:]

        if len(tokens) > 1:
            cause = "Too many filters defined for %s, only the first one is considered" % url
            logger.warning(cause)

        token = tokens[0]
        filter_tokens = token.split(PRJ_JSON_FILTER_OP_ASSIGNMENT)

        if len(filter_tokens) != 2:
            cause = "Too many tokens after splitting for %s in %s" % (token, url)
            logger.error(cause)
            raise ELKError(cause=cause)

        fltr_name = filter_tokens[0].strip()
        fltr_value = filter_tokens[1].strip()

        params['filter-' + fltr_name] = fltr_value

        return params
403372
function paramsParser(url, rule) {
    var matches = rule.regexp.exec(url).slice(1);
    var keys = rule.keys;
    var params = {};

    for (var i = 0; i < keys.length; i++) {
      params[keys[i]] = matches[i];
    }

    return params;
  }
1080391
private function getParameters() {
		
		$url = '/' == $this->url{0} ? substr($this->url,1) : $this->url;
		
		// split parameters by slash
		$params = explode('/', $url);
		
		// reveal ajax calls and raw requests and cuts special prefix from URL
		if (array_key_exists(0, $params)) {
			
			switch ($params[0]) {
				
				case 'ajax':
					$this->ajax = $this->raw = TRUE;
					array_shift($params);
					break;
					
				case 'raw':
					$this->raw = TRUE;
					array_shift($params);
					break;
					
			}
			
		}
		
		return $params;
		
	}
231628
def to_h(all=false)
      filter_parameters.select{|k,v| all || !v.blank?}
    end
196037
function stripParameters(str) {
	// Split parameters or split folder separator
	if (str.indexOf('?') > -1) {
		return str.split('?')[0];
	} else if (str.indexOf('/') > -1) {
		return str.split('/')[0];
	}
	return str;
}