String regex = "^([^ ]*) +[^ ]* +[^ ]* +\\[([^]]*)\\] +\\\"([^ ]*) ([^ ]*) [^ ]*\\\" ([^ ]*) ([^ ]*).*$";
Fields fieldDeclaration = new Fields( "ip", "time", "method", "event", "status", "size" );
int[] groups = {1, 2, 3, 4, 5, 6};
RegexParser function = new RegexParser( fieldDeclaration, regex, groups );
pipe = new Each( pipe, new Fields( "line" ), function );
pipe = new Each( pipe, new Fields( "method" ), new RegexFilter( "^fobar" ) ); // intentionally filtering all
pipe = new GroupBy( pipe, new Fields( "method" ) );
pipe = new Each( pipe, new Fields( "method" ), new Identity( new Fields( "value" ) ), Fields.ALL );
pipe = new GroupBy( pipe, new Fields( "value" ) );
pipe = new Every( pipe, new Count(), new Fields( "value", "count" ) );