blueflood-elasticsearch/src/main/java/com/rackspacecloud/blueflood/io/ElasticsearchRestHelper.java
protected String getRegexToHandleTokens(GlobPattern globPattern) {
        String[] queryRegexParts = globPattern.compiled().toString().split("\\\\.");

        return Arrays.stream(queryRegexParts)
                .map(this::convertRegexToCaptureUptoNextToken)
                .collect(joining(Locator.METRIC_TOKEN_SEPARATOR_REGEX));
    }
protected String getRegexToHandleTokens(GlobPattern globPattern) {
        String[] queryRegexParts = globPattern.compiled().toString().split("\\\\.");

        return Arrays.stream(queryRegexParts)
                .map(this::convertRegexToCaptureUptoNextToken)
                .collect(joining(Locator.METRIC_TOKEN_SEPARATOR_REGEX));
    }
For a given glob, gives regex for {@code Locator.METRIC_TOKEN_SEPARATOR} separated tokens

For example:
globPattern of foo.*.* would produce a regex  foo\.[^.]+\.[^.]+
globPattern of foo.b*.* would produce a regex foo\.b[^.]*\.[^.]+

@param globPattern
@return