docs: public static List<String> regexGroups(Pattern regex, String str) {
      if (str == null) {
        return null;
      }
  
      Matcher matcher = regex.matcher(str);
      if (!matcher.find()) {
        return null;
      }
  
      List<String> groups = new ArrayList<String>();
      for (int index = 1; index <= matcher.groupCount(); index++) {
        groups.add(matcher.group(index));
      }
  
      return groups;
    }