In Perl, you could set the record separator ($/)to something like "timestamp:" and read the records in, searching for what you want.

I've got to dash out now, so don't have time to have a stab at it, but perhaps someone else will either tell me I'm a buffoon for suggesting this or show how it's done :)