public String[] match(String text){
  List<String> matches=new ArrayList<String>();
  _match(text,matches);
  String arr[]=new String[matches.size()];
  for (int i=0; i < matches.size(); i++)   arr[i]=matches.get(i);
  return arr;
}

public String [ ] match ( String text ) { List < String > matches = new ArrayList < String > ( ) ; _match ( text , matches ) ; String arr [ ] = new String [ matches . size ( ) ] ; for ( int i = 0 ; i < matches . size ( ) ; i ++ ) arr [ i ] = matches . get ( i ) ; return arr ; }
this method is borrowed from the javascript regexp object . it parses a string and returns as an array any assignments to parenthesis groups in the pattern ' s regular expression
