common/src/main/java/com/streamsets/pipeline/lib/parser/shaded/com/google/code/regexp/Pattern.java
public int indexOf(String groupName, int index) {
        int idx = -1;
        if (groupInfo.containsKey(groupName)) {
            List<GroupInfo> list = groupInfo.get(groupName);
            idx = list.get(index).groupIndex();
        }
        return idx;
    }
public int indexOf(String groupName, int index) {
        int idx = -1;
        if (groupInfo.containsKey(groupName)) {
            List<GroupInfo> list = groupInfo.get(groupName);
            idx = list.get(index).groupIndex();
        }
        return idx;
    }
Gets the group index of a named capture group at the
specified index. If only one instance of the named
group exists, use index 0.

@param groupName name of capture group
@param index the instance index of the named capture group within
the pattern; e.g., index is 2 for the third instance
@return group index or -1 if not found
@throws IndexOutOfBoundsException if instance index is out of bounds