code: private static String adopt2JavaPattern(String pattern)
     {
        pattern = normalizePath(pattern);
  
        // any character except '/', one or more times
        pattern = pattern.replaceAll("\\" + ANY_NAME, "[^/]+");
  
        // any character except '/' exactly one time
        pattern = pattern.replaceAll(ANY_CHAR, "[^/]{1}");
  
        return pattern;
     }
docs: Adopts pattern introduced in simple user friendly form to Java {@link Pattern}.