Here is my task:
I have a text file that I have to parse for new information daily. Here is a sample of the text file.
Code:
Chairs:
Bloomfield, Columbus, Duncan, Holdrege, Osceola, Schuyler,
Superior, Tarnov, Wakefield 1.75
Columbus, Duncan, Osceola, Schuyler, Tarnov 2.45
Belgrade 2.41
Footstools:
Bloomfield, Columbus, Duncan, Holdrege, Osceola, Schuyler,
Superior, Tarnov, Wakefield 1.75
Columbus, Duncan, Osceola, Schuyler, Tarnov 2.16
Belgrade 2.41
Tables:
Columbus, Duncan, Osceola, Schuyler, Silver Creek, Tarnov 5.17
Belgrade, Plymouth 5.16
I need to read the number following the word Columbus under the chairs and tables section but not the entry under footstools in the file. You will notice the number does not always appear on the same line as the word Columbus, it may be on the next line down. I then need to write that data to a csv file which will then be imported into a database for historical purposes.
Does anyone have any ideas?
Thanks,
Jef