i need to parse through a text file and process the data. the valid data is usually denoted by either a timestamp with TS followed by 10 numbers (TS1040501134) or values with a alpabet followed by nine numbers (A098098098)…so it will be like TS1040501134A111111111B222222222...........TS1020304050A000000000........
However, there are cases when there will be filler 0s when there is no data. So, such a case might be
00000000000000000000TS1040501134A111111111B2222222220000000000TS1020304050A000000000........`
Now as we can see I need to ignore these zeros. how might i do this? I am using gnu C.
My first attempt at something ‘C’ like in
about 20 years… So what follows is, at best, pseudo-code!
Read in a line of text, then…
If lines do not have to contain complete strings (eg. one line ends with
TS10405andthe next line begins with
01134), you will have to write extra code to manage refreshing thetextbuffer properly.