public static String replicaSetUsedIn(String addresses){
  if (addresses.startsWith("[")) {
    return null;
  }
  int index=addresses.indexOf('/');
  if (index < 0)   return null;
  return addresses.substring(0,index);
}

public static String replicaSetUsedIn ( String addresses ) { if ( addresses . startsWith ( "[" ) ) { return null ; } int index = addresses . indexOf ( '/' ) ; if ( index < 0 ) return null ; return addresses . substring ( 0 , index ) ; }
find the name of the replica set precedes the host addresses .
