<pre>
Regular expression that matches the file paths for all files that should be
referenced by this handler.
</pre>

<code>string upload_path_regex = 2;</code>
762221
public com.google.protobuf.ByteString
      getUploadPathRegexBytes() {
    java.lang.Object ref = uploadPathRegex_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      uploadPathRegex_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
1154110
private static PathMapping pathStringMapping(String pathPrefix, Method method,
                                                 Set<Annotation> methodAnnotations) {
        pathPrefix = ensureAbsolutePath(pathPrefix, "pathPrefix");
        if (!pathPrefix.endsWith("/")) {
            pathPrefix += '/';
        }

        final String pattern = findPattern(method, methodAnnotations);
        final PathMapping mapping = PathMapping.of(pattern);
        if ("/".equals(pathPrefix)) {
            // pathPrefix is not specified or "/".
            return mapping;
        }

        if (pattern.startsWith(EXACT)) {
            return PathMapping.ofExact(concatPaths(
                    pathPrefix, pattern.substring(EXACT.length())));
        }

        if (pattern.startsWith(PREFIX)) {
            return PathMapping.ofPrefix(concatPaths(
                    pathPrefix, pattern.substring(PREFIX.length())));
        }

        if (pattern.startsWith(GLOB)) {
            final String glob = pattern.substring(GLOB.length());
            if (glob.startsWith("/")) {
                return PathMapping.ofGlob(concatPaths(pathPrefix, glob));
            } else {
                // NB: We cannot use PathMapping.ofGlob(pathPrefix + "/**/" + glob) here
                //     because that will extract '/**/' as a path parameter, which a user never specified.
                return new PrefixAddingPathMapping(pathPrefix, mapping);
            }
        }

        if (pattern.startsWith(REGEX)) {
            return new PrefixAddingPathMapping(pathPrefix, mapping);
        }

        if (pattern.startsWith("/")) {
            // Default pattern
            return PathMapping.of(concatPaths(pathPrefix, pattern));
        }

        // Should never reach here because we validated the path pattern.
        throw new Error();
    }
440887
@Override
    public boolean matches(Source src) {
        String name = src.getOrigin().getName().toLowerCase();
        String[] extensions = getInputFileExtensions();
        if (extensions.length == 1) {
            return FilenameUtils.isExtension(name, extensions[0]);
        }

        return FilenameUtils.isExtension(name, extensions);
    }
1031721
public boolean match(String value) {
    value = StringUtils.removeStart(value, "/");
    value = StringUtils.removeEnd(value, "/");
    return pattern.matcher(value).matches();
  }
1296708
private String getRemoteFileName(UploadFile file) {

        // if the remote path ends with /
        // it means that the remote path specifies only the directory structure, so
        // get the remote file name from the local file
        if (file.getProperty(PARAM_REMOTE_PATH).endsWith("/")) {
            return file.getName(service);
        }

        // if the remote path contains /, but it's not the last character
        // it means that I have something like: /path/to/myfilename
        // so the remote file name is the last path element (myfilename in this example)
        if (file.getProperty(PARAM_REMOTE_PATH).contains("/")) {
            String[] tmp = file.getProperty(PARAM_REMOTE_PATH).split("/");
            return tmp[tmp.length - 1];
        }

        // if the remote path does not contain /, it means that it specifies only
        // the remote file name
        return file.getProperty(PARAM_REMOTE_PATH);
    }
433935
static URL tryToGetValidUrl(String workingDir, String path, String filename) {
        try {
            if (new File(filename).exists())
                return new File(filename).toURI().toURL();
            if (new File(path + File.separator + filename).exists())
                return new File(path + File.separator + filename).toURI().toURL();
            if (new File(workingDir + File.separator + filename).exists())
                return new File(workingDir + File.separator + filename).toURI().toURL();
            if (new File(new URL(filename).getFile()).exists())
                return new File(new URL(filename).getFile()).toURI().toURL();
        } catch (MalformedURLException e) {
            // don't do anything, we're going on the assumption it is a jar, which could be wrong
        }
        return null;
    }
21992
@Override
	public boolean upload(String path, File file) {
		Assert.notNull(file, "file to upload is null !");
		return upload(path, file.getName(), file);
	}
134405
private String validatePath(String path) throws CmsSecurityException {

        // Problems with spaces in new folders (default: "Neuer Ordner")
        // Solution: translate this to a correct name.
        String ret = m_cms.getRequestContext().getFileTranslator().translateResource(path);

        // add site root only works correct if system folder ends with a slash
        if (CmsResource.VFS_FOLDER_SYSTEM.equals(ret)) {
            ret = ret.concat("/");
        }

        // filter path
        if (isFiltered(ret)) {
            throw new CmsSecurityException(Messages.get().container(Messages.ERR_ITEM_FILTERED_1, path));
        }

        return ret;
    }
866369
public boolean matches(String string) {		
		Matcher matcher = pattern.matcher(string);
		boolean result = matcher.matches();
		return result;		
	}
252044
protected boolean match(final String path) {

        final String methodName = "match";

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName, this, path, ignoreCase, wildcard);
        }

        if (this.matcher == null) {
            if (ignoreCase) {
                if (pattern.equalsIgnoreCase(path)) {
                    return true;
                }
                if (wildcard && path.toLowerCase().startsWith(pattern)) {
                    return true;
                }
            } else {
                if (pattern.equals(path)) {
                    return true;
                }
                if (wildcard && path.startsWith(pattern)) {
                    return true;
                }
            }
        } else {
            return this.matcher.matcher(path).matches();
        }

        return false;
    }
38586
public String tagSeged2StringALL(String[] src) {
		StringBuilder sb = new StringBuilder();
		String[] target = tagSeged(src);
		if(target==null)
			return null;
		String res = format(src, target);
		return res;
	}
671110
public static @NotNull String validFilename(@NotNull String value) {
    String fileExtension = StringUtils.substringAfterLast(value, ".");
    String fileName = StringUtils.substringBeforeLast(value, ".");
    if (StringUtils.isEmpty(fileExtension)) {
      return validName(fileName);
    }
    return validName(fileName) + "." + validName(fileExtension);
  }
397908
public String validate(Path path) throws IOException, SAXException {
        try (OneOffValidator validator = new OneOffValidator(asciiQuotes, detectLanguages, forceHTML, lineOffset, loadEntities, noStream, outputFormat, schemaUrl)) {
            return validator.validate(path);
        }
    }
992813
def submit_string(self):
        """"""
        required = []
        optional = []
        for file_verifier in self.file_verifiers:
            if file_verifier.optional:
                optional.append('[{0}]'.format(file_verifier.filename))
            else:
                required.append(file_verifier.filename)
        return ' '.join(sorted(required) + sorted(optional))
954318
private String validatePath(String path, int line) throws ParseException {
		if (!path.startsWith("/")) {
			throw new ParseException("Path must start with '/'", line);
		}

		boolean openedKey = false;
		for (int i=0; i < path.length(); i++) {

			boolean validChar = isValidCharForPath(path.charAt(i), openedKey);
			if (!validChar) {
				throw new ParseException(path, i);
			}

			if (path.charAt(i) == '{') {
				openedKey = true;
			}

			if (path.charAt(i) == '}') {
				openedKey = false;
			}

		}

		return path;
	}
349953
void processSiteRow(String siteRow) {
		String[] row = getSiteRowFields(siteRow);

		String filePath = "";
		String pagePath = "";

		String dataArray = row[8].substring(row[8].indexOf('{'),
				row[8].length() - 2);

		// Explanation for the regular expression below:
		// "'{' or ';'" followed by either
		// "NOT: ';', '{', or  '}'" repeated one or more times; or
		// "a single '}'"
		// The first case matches ";s:5:\"paths\""
		// but also ";a:2:" in "{s:5:\"paths\";a:2:{s:9:\ ...".
		// The second case matches ";}" which terminates (sub)arrays.
		Matcher matcher = Pattern.compile("[{;](([^;}{][^;}{]*)|[}])").matcher(
				dataArray);
		String prevString = "";
		String curString = "";
		String path = "";
		boolean valuePosition = false;

		while (matcher.find()) {
			String match = matcher.group().substring(1);
			if (match.length() == 0) {
				valuePosition = false;
				continue;
			}
			if (match.charAt(0) == 's') {
				valuePosition = !valuePosition && !"".equals(prevString);
				curString = match.substring(match.indexOf('"') + 1,
						match.length() - 2);
			} else if (match.charAt(0) == 'a') {
				valuePosition = false;
				path = path + "/" + prevString;
			} else if ("}".equals(match)) {
				valuePosition = false;
				path = path.substring(0, path.lastIndexOf('/'));
			}

			if (valuePosition && "file_path".equals(prevString)
					&& "/paths".equals(path)) {
				filePath = curString;
			} else if (valuePosition && "page_path".equals(prevString)
					&& "/paths".equals(path)) {
				pagePath = curString;
			}

			prevString = curString;
			curString = "";
		}

		MwSitesDumpFileProcessor.logger.debug("Found site data \"" + row[1]
				+ "\" (group \"" + row[3] + "\", language \"" + row[5]
				+ "\", type \"" + row[2] + "\")");
		this.sites.setSiteInformation(row[1], row[3], row[5], row[2], filePath,
				pagePath);
	}
1306350
public static Predicate<String> regex(final String pathRegex) {
    return new Predicate<String>() {
      @Override
      public boolean test(String input) {
        return input.matches(pathRegex);
      }
    };
  }