in reply to How to parse a text file

I have to admit, I like jethro's suggestion of a state machine and if I could vote for it twice, I would.