in reply to Re^2: searching across a file then parsing
in thread searching across a file then parsing

Seek is a low level critter that only deals with bytes, not lines. And if we are talking about unicode, we aren't even talking about characters since one character could be multiple bytes. I think it is highly unlikely that seek() will play any role at all in the final solution to this problem. It is very rare to use seek in a text file.

The problem requirements just aren't specified clearly enough here to proceed further without hearing more from the OP.

I like the idea presented by oko1. But until the OP gives a rule for what to include before the "match", we are just all guessing.

  • Comment on Re^3: searching across a file then parsing