public static final int getIndex(String segment) {
        if (isArraySegment(segment)) {
        	Matcher matcher = ARRAY_SYNTAX_PATTERN.matcher(segment);
        	matcher.find();
            return Integer.parseInt(matcher.group(2));
        }
        return -1;
    }