code: public static PathMatcher getPathMatcher(
        String syntaxAndPattern, String separators, ImmutableSet<PathNormalization> normalizations) {
      int syntaxSeparator = syntaxAndPattern.indexOf(':');
      checkArgument(
          syntaxSeparator > 0, "Must be of the form 'syntax:pattern': %s", syntaxAndPattern);
  
      String syntax = Ascii.toLowerCase(syntaxAndPattern.substring(0, syntaxSeparator));
      String pattern = syntaxAndPattern.substring(syntaxSeparator + 1);
  
      switch (syntax) {
        case "glob":
          pattern = GlobToRegex.toRegex(pattern, separators);
          // fall through
        case "regex":
          return fromRegex(pattern, normalizations);
        default:
          throw new UnsupportedOperationException("Invalid syntax: " + syntaxAndPattern);
      }
    }
docs: Perhaps so, assuming Path always canonicalizes its separators