code: public static String getRoleName(String containerName) {
  
      if (!isRole(containerName) && !isQualifiedRole(containerName))
        throw new VOMSError("No role specified in \"" + containerName
          + "\" voms syntax.");
  
      Matcher m = fqanPattern.matcher(containerName);
  
      if (m.matches()) {
  
        String roleGroup = m.group(4);
        return roleGroup
          .substring(roleGroup.indexOf('=') + 1, roleGroup.length());
  
      }
  
      return null;
    }
docs: This method extracts the role name information from the FQAN passed as
  argument.
  
  @param containerName
  the FQAN
  @return <ul>
  <li>A string containing the role name, if found</li>
  <li>null, if no role information is contained in the FQAN passed as
  argument
  </ul>