Hello all!
I am a programming n00b but learning more and more each day however I am stuck on something and I was hoping someone could provide some guidance. I am attempting to parse data that has been submitted by the user, or grabbed directly from a file, into a database. I have done some searching and it seems like this would be an easy thing to do if not for the fact that the data will have a slightly different format each time. For example:
TU 2167 TTT-WSD 1115 1344 129 40
TU 2986 WSD-VRE 1424 1535 111 502 0 502 0 1050 VRE 1425
Will sometimes look like this:
TU 2046 BH WSD-TTT 0924 0958 134 117
TU 2167 TTT-WSD 1115 1344 129 40 <-----NONE
TU 2986 WSD-VRE 1424 1535 111 502 0 502 0 1050 VRE 1425
Sometimes even slightly different than that.
I would like to be able to parse each value so that I can enter it into a database. However sometimes the data will have extra lines of characters before and/or after the parts I need, sometimes in between. The data does have a general order to it, it's just that sometimes values are not needed and thus left out. What class(es) should I be looking at to help me do this? I have been exploring the System.Text.RegularExpressions Match and MatchCollections classes but I'm not sure if I am heading in the right direction.
Thanks Again!