protected void parseList(ArrayList<String> list,String text){
  list.clear();
  StringTokenizer st=new StringTokenizer(text,"\n\r");
  while (st.hasMoreElements()) {
    String line=(String)st.nextElement();
    list.add(line.trim());
  }
}

protected void parseList ( ArrayList < String > list , String text ) { list . clear ( ) ; StringTokenizer st = new StringTokenizer ( text , "\n\r" ) ; while ( st . hasMoreElements ( ) ) { String line = ( String ) st . nextElement ( ) ; list . add ( line . trim ( ) ) ; } }
create a list of patterns from chunk of text , patterns are separated with newline
