code: public static String getOidFromRef(String ref) {
          Matcher matcher = match(ref);
          return matcher != null ? matcher.group(2) : null;
      }
docs: Get the ObjectID from the specified ref url
  
  @param ref the ref url to extract the ObjectID from
  
  @return the extracted ObjectID or null if the specified ref was not valid