code: public String nextGroup() {
      int currentPosition = this.position;
  
      do {
        char currentCharacter = this.characters[currentPosition];
        if (currentCharacter == '[') {
          currentPosition = NucleotideParser.getMatchingBracketPosition(this.characters, currentPosition, '[', ']');
        } else if (currentCharacter == '(') {
          currentPosition = NucleotideParser.getMatchingBracketPosition(this.characters, currentPosition, '(', ')');
        } else if (currentCharacter != '.') {
          currentPosition++;
        }
  
        if (currentPosition < 0) {
          currentPosition = this.characters.length;
        }
  
      } while ((currentPosition < this.characters.length)
          && (this.characters[currentPosition] != '.'));
  
      String token = this.notationString.substring(this.position, currentPosition);
  
      this.position = currentPosition + 1;
  
      return token;
    }
docs: Returns the next group
  
  @return notation group