@Nullable
    private static RegExpGroup resolveRelativeGroup(int index, PsiFile file) {
        List<RegExpGroup> groups = SyntaxTraverser.psiTraverser(file)
          .filter(RegExpGroup.class)
          .filter(RegExpGroup::isCapturing)
          .toList();
        return index <= groups.size() ? groups.get(groups.size() - index) : null;
    }
@Nullable
    private static RegExpGroup resolveRelativeGroup(int index, PsiFile file)