"spir" <denis.s...@free.fr> wrote
But a third option is to use a split and apply it to the whole file as
a string thereby breaking the file into as many chunks as start with
a line containing 'NEW'...

Why not simply a regex pattern starting with "NEW" and ending with '\n'?

Because I understood the OP had to extract the info from the lines *following* the one with NEW. You could mess around with match object stat positions etc but split seemed a much easier solution.
Alan G

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to