Hello. I need to parse a file a little differently than usual and am a little flumoxed as to an approach. My file has information grouped in sections by database output. Each section is defined by an introductory "DATABASE: <DBASENAME>" line followed by that database's output.
I'd like to be able to parse each section in order, then add a line just below the DATABASE: line that indicates some piece of information found in that section like "WIDGETS FOUND: 13," after which I would proceed to the next section. Does anyone have any suggestions at all as to how I might approach this?