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