public static String[] parseTitle(String title){
  String v[]={"",""};
  if (title == null)   return v;
  Pattern p=Pattern.compile("(.*)\\s+\\(?([0-9]{4})\\)?",Pattern.CASE_INSENSITIVE);
  Matcher m=p.matcher(title);
  if (m.find()) {
    v[0]=m.group(1);
    v[1]=m.group(2);
  }
 else {
    v[0]=title;
  }
  return v;
}

public static String [ ] parseTitle ( String title ) { String v [ ] = { "" , "" } ; if ( title == null ) return v ; Pattern p = Pattern . compile ( "(.*)\\s+\\(?([0-9]{4})\\)?" , Pattern . CASE_INSENSITIVE ) ; Matcher m = p . matcher ( title ) ; if ( m . find ( ) ) { v [ 0 ] = m . group ( 1 ) ; v [ 1 ] = m . group ( 2 ) ; } else { v [ 0 ] = title ; } return v ; }
return a 2 element array . 0 = title ; 1 = date parses the title in the format title year or title ( year )
