The path of the request

@param path      string path to use when generating requests
@param pathRegex regular expression to use to match paths
354740
public PactDslRequestWithPath matchPath(String pathRegex, String path) {
        requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex));
        return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state,
          description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators,
          defaultRequestValues, defaultResponseValues);
    }
846139
protected static String normalizePath (String path) {
    int pathLen;
    do {
      pathLen = path.length();
      path = path.replaceAll("[^/]+/\\.\\./", "");
    } while (path.length() != pathLen);
    return path;
  }
199905
public PactDslRequestWithPath path(String path) {
        return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state,
          description, path, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators,
          defaultRequestValues, defaultResponseValues);
    }
953129
public void setPath(String path) throws URIException {

        if (path == null || path.length() == 0) {
            _path = _opaque = (path == null) ? null : path.toCharArray();
            setURI();
            return;
        }
        // set the charset to do escape encoding
        String charset = getProtocolCharset();

        if (_is_net_path || _is_abs_path) {
            _path = encode(path, allowed_abs_path, charset);
        } else if (_is_rel_path) {
            StringBuffer buff = new StringBuffer(path.length());
            int at = path.indexOf('/');
            if (at == 0) { // never 0
                throw new URIException(URIException.PARSING,
                        "incorrect relative path");
            }
            if (at > 0) {
                buff.append(encode(path.substring(0, at), allowed_rel_path,
                            charset));
                buff.append(encode(path.substring(at), allowed_abs_path,
                            charset));
            } else {
                buff.append(encode(path, allowed_rel_path, charset));
            }
            _path = buff.toString().toCharArray();
        } else if (_is_opaque_part) {
            StringBuffer buf = new StringBuffer();
            buf.insert(0, encode(path.substring(0, 1), uric_no_slash, charset));
            buf.insert(1, encode(path.substring(1), uric, charset));
            _opaque = buf.toString().toCharArray();
        } else {
            throw new URIException(URIException.PARSING, "incorrect path");
        }
        setURI();
    }
969068
function pathToRegExp(path) {
    if (path instanceof RegExp) {
      return {
        keys: [],
        regexp: path
      };
    }
    if (path instanceof Array) {
      path = '(' + path.join('|') + ')';
    }

    var rtn = {
      keys: [],
      regexp: null
    };

    rtn.regexp = new RegExp((isHashRouter(path) ? '' : '^') + path.replace(/([\/\(]+):/g, '(?:').replace(/\(\?:(\w+)((\(.*?\))*)/g, function (_, key, optional) {
      rtn.keys.push(key);
      var match = null;
      if (optional) {
        match = optional.replace(/\(|\)/g, '');
      } else {
        match = '/?([^/]+)';
      }
      return '(?:' + match + '?)';
    })
    // fix double closing brackets, are there any better cases?
    // make a commit and send us a pull request. XD
    .replace('))', ')').replace(/\*/g, '(.*)') + '((#.+)?)$', 'i');

    return rtn;
  }
358223
PathMatcher.PathMatch<HostEntry> match(String path){
        int length = path.length();
        final int[] lengths = this.lengths;
        for (int i = 0; i < lengths.length; ++i) {
            int pathLength = lengths[i];
            if (pathLength == length) {
                HostEntry next = contexts.get(path);
                if (next != null) {
                    return new PathMatcher.PathMatch<>(path, "", next);
                }
            } else if (pathLength < length) {
                char c = path.charAt(pathLength);
                if (c == '/') {
                    String part = path.substring(0, pathLength);
                    HostEntry next = contexts.get(part);
                    if (next != null) {
                        return new PathMatcher.PathMatch<>(part, path.substring(pathLength), next);
                    }
                }
            }
        }
        if(defaultHandler.contexts.isEmpty()) {
            return new PathMatcher.PathMatch<>("", path, null);
        }
        return new PathMatcher.PathMatch<>("", path, defaultHandler);
    }
889845
protected void checkPath(Path path) {
    URI thisUri = this.getUri();
    URI thatUri = path.toUri();
    String thatAuthority = thatUri.getAuthority();
    if (thatUri.getScheme() != null
        && thatUri.getScheme().equalsIgnoreCase(thisUri.getScheme())
        && thatUri.getPort() == NameNode.DEFAULT_PORT
        && thisUri.getPort() == -1
        && thatAuthority.substring(0,thatAuthority.indexOf(":"))
        .equalsIgnoreCase(thisUri.getAuthority()))
      return;
    super.checkPath(path);
  }
1246406
public static boolean validatePath(String path) {
        if(path == null) {
            Log.w(TAG, "Uploading path not set");
            return false;
        }

        try {
            uriFromString(path);
            return true;
        } catch(DataSinkException e) {
            return false;
        }
    }
350479
def get_path_regex(self, path):
        
        for regex, func in self._regex_map:
            match = re.match(regex, path)
            if match:
                return func(match)

        return None, None
519919
public final boolean matches(@NotNull final String targetPath) {
        Contract.requireArgNotNull("targetPath", targetPath);
        if (regExpr == null) {
            return true;
        }
        return regExpr.matcher(targetPath).find();
    }
531097
def match(path)
      m = path.match(@rx)
      Match.new(remaining_path(path, m), match_to_params(m)) if m
    end
43073
public String pathParam(HttpServletRequest req, String key) {
		return match.param(req.getPathInfo(), key);
	}
630167
public static void deletePathByRegex(FileSystem fs, final Path path, final String regex) throws IOException {
    FileStatus[] statusList = fs.listStatus(path, path1 -> path1.getName().matches(regex));

    for (final FileStatus oldJobFile : statusList) {
      HadoopUtils.deletePath(fs, oldJobFile.getPath(), true);
    }
  }
278837
public String getMessage (HttpServletRequest req, String path)
    {
        return getMessage(req, path, true);
    }
340063
public static URI getUri(UriInfo uriInfo,
                             HttpServletRequest req,
                             String path) {
        String suffix = "";
        if (req.getRequestURI().endsWith(".json")) {
            suffix = ".json";
        } else if (req.getRequestURI().endsWith(".xml")) {
            suffix = ".xml";
        }
        return URI.create(uriInfo.getBaseUri() + "/" + path + suffix);
    }
160902
private static String checkPath(String path) {
        File file = new File(path);
        int idx = path.lastIndexOf(".");
        String post = "";
        if (idx > -1) {
            post = path.substring(idx);
            path = path.substring(0, idx);
        }
        int i = 0;
        while (file.exists()) {
            file = new File(path + "_" + (++i) + post);
        }
        return file.getAbsolutePath();
    }
488429
public T path(String path) {
        if (path.length() == 0) {
            this.path += encodePath(path);
        } else {
            this.path += "/" + encodePath(path);
        }
        return returnThis();
    }