public static String stripUrl(String url){
  if (url == null)   return null;
  Matcher m=STRIP_URL_PATTERN.matcher(url);
  if (m.matches()) {
    return m.group(1);
  }
 else {
    return url;
  }
}

public static String stripUrl ( String url ) { if ( url == null ) return null ; Matcher m = STRIP_URL_PATTERN . matcher ( url ) ; if ( m . matches ( ) ) { return m . group ( 1 ) ; } else { return url ; } }
strips the provided url of preceding " http : / / " and any trailing " / " . does not strip " https : / / " . if the provided string cannot be stripped , the original string is returned . todo : put this in textutils to be used by other packages doing something similar .
