private static String quotePrecedingLiteralsAndReset(StringBuilder literals) {
        if (literals.length() > 0) {
            String quoted = literals.toString();
            literals.setLength(0);
            return Pattern.quote(quoted);
        }
        return "";
    }
Matching engine for glob patterns having where one ore more alternative characters acts a boundary for wildcard matching.

@author bjorncs
security-utils/src/main/java/com/yahoo/security/tls/GlobPattern.java