public static String extractGroupName(String groupName){
  Pattern p=Pattern.compile("^\\S+\\+(\\S+)$");
  Matcher matcher=p.matcher(groupName);
  if (matcher.matches()) {
    return matcher.group(1);
  }
  return groupName;
}

public static String extractGroupName ( String groupName ) { Pattern p = Pattern . compile ( "^\\S+\\+(\\S+)$" ) ; Matcher matcher = p . matcher ( groupName ) ; if ( matcher . matches ( ) ) { return matcher . group ( 1 ) ; } return groupName ; }
blocksnapshot instances associated to an blocksnapshotsession will have its replicationgroupname field set in a different format than regular blocksnapshot instances , e . g . system - serial + groupname . this method will extract and return only the group name , if required .
