private boolean parseHtml(String html){
  Pattern p=Pattern.compile("<meta http-equiv=\"refresh\" content=\"([^;]*); url=([\"]*)\">");
  Matcher m=p.matcher(html);
  if (!m.find()) {
    p=Pattern.compile("<meta content=\"([^;]*); url=([^\"]*)\" http-equiv=\"refresh\">");
    m=p.matcher(html);
  }
  if (!m.find()) {
    return false;
  }
  delay=Integer.parseInt(m.group(1));
  url=m.group(2);
  return true;
}

private boolean parseHtml ( String html ) { Pattern p = Pattern . compile ( "<meta http-equiv=\"refresh\" content=\"([^;]*); url=([\"]*)\">" ) ; Matcher m = p . matcher ( html ) ; if ( ! m . find ( ) ) { p = Pattern . compile ( "<meta content=\"([^;]*); url=([^\"]*)\" http-equiv=\"refresh\">" ) ; m = p . matcher ( html ) ; } if ( ! m . find ( ) ) { return false ; } delay = Integer . parseInt ( m . group ( 1 ) ) ; url = m . group ( 2 ) ; return true ; }
parses the html to look for meta - refresh .
