
dgatwood
is out. Leave a message.
ok...next time...the data will be in no certian order....your little script will have to figure out what goes where....![]()
As long as they are separated by line breaks, this script would almost do it even if the field order were randomly permuted. It's a pretty dumb script. Now if you told me that the data might be in the line after the field name, the same line as the field name, or the line before the field name, depending on whether there was a colon after the field name or not, that would be more difficult....
For an added challenge, make some of the field names optional, make the names arbitrary (field1, field2, etc.), and make the interpretation of the field names dependent on whether the previous field was populated or not, e.g. a blank field4 (address line 2) results in the next field, field5, being an added "Company Name" field. Otherwise, field5 is city.
And that's the sort of crap I have to put up with when parsing C/C++/ObjC source code....