private String globToRegex(String glob) {
        StringBuilder ret = new StringBuilder();
        ret.append("^");
        for (int i = 0; i < glob.length(); i++) {
            ret.append(globToRegex(glob.charAt(i)));
        }
        ret.append("$");

        return ret.toString();
    }
Converts a glob pattern to a corresponding regular expression string.

@param glob The glob pattern.
@return The regex string.
document/src/main/java/com/yahoo/document/select/rule/ComparisonNode.java