code: public List<String> getTextGroups(final String toTest, final int group) {
          List<String> groups = new ArrayList<>();
          Matcher m = pattern.matcher(toTest);
          while (m.find()) {
              groups.add(m.group(group));
          }
          return groups;
      }
docs: Extract exact group from string and add it to list
  
  Example:
  String text = "SampleHelloWorldString";
  VerbalExpression regex = regex().capt().oneOf("Hello", "World").endCapt().maybe("String").build();
  list = regex.getTextGroups(text, 0) //result: "Hello", "WorldString"
  list = regex.getTextGroups(text, 1) //result: "Hello", "World"
  
  @param toTest - string to extract from
  @param group  - group to extract
  @return list of extracted groups