code: public List<String> groupNames() {
          if (groupNames == null) {
              groupNames = new ArrayList<String>(groupInfo.keySet());
          }
          return Collections.unmodifiableList(groupNames);
      }
docs: Gets the names of all capture groups
  
  @return the list of names