code: public static String urlToUserInfo(String url) {
  		String lcUrl = url.toLowerCase();
  		if(lcUrl.startsWith(DNS_SCHEME)) {
  			return null;
  		}
  		for(String scheme : ALL_SCHEMES) {
  			if(lcUrl.startsWith(scheme)) {
  				int authorityIdx = scheme.length();
  
  				Matcher m = 
  					USERINFO_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
  				if(m.find()) {
  					return m.group(1);
  				}
  			}
  		}
  		return null;
  	}
docs: Extract userinfo from the absolute URL argument, that is, "username@", or
  "username:password@" if present.
  @param url the URL from which to extract the userinfo
  @return the userinfo found, not including the "@", or null if no userinfo
  is found