I'm relatively new to VB programming (VB 2005), and have come across a problem parsing complex text files. Basically I have a file which has lines something like the following:
[WEIGHT_AND_BALANCE]
max_gross_weight = 150000 // (pounds)
empty_weight = 74170 // (pounds)
max_number_of_stations = 50
station_load.0 = "170.0, 41.0, -1.5, 0.0, Pilot" //Weight (lbs),
station_load.1 = "170.0, 41.0, 1.5, 0.0, Co-Pilot" //Weight (lbs),
station_load.2 = "510.0, 0.0, 0.0, 0.0, Crew" //Weight (lbs),
station_load.3 = "1360.0, 25.5, 0.0, 0.0, First Class" //Weight (lbs),
What I need to do is search the file to find the 'empty_weight' line for example and find the value after the = sign. Similarly, with the station_load sections, I would need the first number after the quotations, as integers and disregard the rest of the line.
I am not sure how to achieve this, I can do simple text parsing with a single delimiter, but don't really know where to start with much more complex files.
Thanks.