in reply to Re: Parsing a Log File
in thread Parsing a Log File

I am looking to produce a report that breaks down the statistics for the various players in different situations. For example lets say this snippet was the entire game. I need to know which quarter the events are taking place in which is clearly defined at the top of the file here. I am not concerned about the kick off action so the first line to parse would be:

1-10-ASH13 (14:30) ASH 48 Hopper ran around right end for 1 yard. Tackled by ORL 94 Whiting, assisted by ORL 54 Schacht.


That line says on 1st and 10 at the Ashveille 13 yard line 48 Hopper ran the ball 1 yard. Now in this game Aheville is the home team so I would essentially want take that information and put it into several "buckets" for the player 48 Hopper. So for example fomr this line we would add information into a "home game bucket" that said he ran once for 1 yard. We would also add that information into a bucket for the first quarter, first half, and 1st down.

For simplicity sakes lets say the next line, which was also a run, was run by Hopper. Then I would just add that information into the home game, 1st quarter, and 1st half buckets, but would have to now drop the new information into a 2nd down bucket since it was on second down.

Is that making it any clearer? I have to deal with penalties which can negate the previous play. The final report would look something like this.

48 Hopper Situation Att Yards Total 2 2 Home 2 2 Away 0 0 1st Quarter 2 2 2nd Quarter 0 0 3rd Quarter 0 0 4th Quarter 0 0 1st down 1 1 2nd down 1 1 3rd down 0 0 4th down 0 0


That is a pretty simplified version of what I am lookig for, but I hope that makes it a bit clearer.

-Prime