On 2012-08-27 13:23, Huso wrote:
Hi,

There can be any number of blocks in the log file.
I distinguish the block by the start header 'ROUTES TRAFFIC RESULTS, LSR' and 
ending in 'END'. Each block will have a unique [date + time] value.

I tried the code you mentioned, it works for the data part.
But I need to get the TRG, MP, DATE and TIME for the block with those data as 
well. This is the part that i'm really tangled in.

Thanking,
Huso
Well, I suggest that you try to understand my code and make changes in it. It is not too hard. First you start reading documentation of the "re" module. It is worth learning Python. Especially for mining data out of text files. :-)

Best,

   Laszlo

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to