src/main/java/org/helm/notation2/parser/StateMachineParser.java
public boolean checkDetailsGroup(String d) {
    LOG.debug("Validation of group's details:");
    String id = "(PEPTIDE[1-9][0-9]*+|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*|G[1-9][0-9]*)";
    String number = "[1-9][0-9]*(\\.[0-9]+)?";
    String ratio = number + "(-" + number + ")?";
    String pattern = id + "(:" + ratio + ")?((\\+|,)" + id + "(:" + ratio + ")?)+";
    
    Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
    Matcher m = p.matcher(d);
    if (m.matches()) {
      LOG.debug("Group's details are valid:");
      return true;
    }
    LOG.debug("Group's details are not valid: " + d);
    return false;
  }
public boolean checkDetailsGroup(String d) {
    LOG.debug("Validation of group's details:");
    String id = "(PEPTIDE[1-9][0-9]*+|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*|G[1-9][0-9]*)";
    String number = "[1-9][0-9]*(\\.[0-9]+)?";
    String ratio = number + "(-" + number + ")?";
    String pattern = id + "(:" + ratio + ")?((\\+|,)" + id + "(:" + ratio + ")?)+";
    
    Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
    Matcher m = p.matcher(d);
    if (m.matches()) {
      LOG.debug("Group's details are valid:");
      return true;
    }
    LOG.debug("Group's details are not valid: " + d);
    return false;
  }
method to validate the details about the group information; this part can
be separated after + to get the id for each single group element : to get
the ratio for each single group element

@param d group information
@return true if the group information is valid, false otherwise