in reply to Re^2: parse a line with varied number of fields
in thread parse a line with varied number of fields

Ok, you have some code now which is a start. However, in general showing some code that "doesn't work" is not that useful unless you also include the actual input, actual output and DESIRED output of that code.

The best is if I have a runnable code example to see exactly what it does given the input. Then some explanation of what you want it to do.

Showing the DATA is important.
Show some examples of these various types of lines - It is possible that I will code it very differently than your formulation.

If there are X fields at the beginning of some huge line, maybe you don't have so show all of them - maybe just one of the first 8-9 fields here would be sufficient? Show one example of the "whole thing", then the simplified examples where the variations start.

  • Comment on Re^3: parse a line with varied number of fields