in reply to Re^7: Time matching YYYY-MM-DD HH:MM:SS.SSS
in thread Time matching YYYY-MM-DD HH:MM:SS.SSS

Wow that's great code except the definition of $date_qr = qr line... The extra space lost me an hour or two this morning. I'm not sure why that made a difference. There is a space after the .\d{3} in the input files. Any ideas? Works like a charm besides that!
  • Comment on Re^8: Time matching YYYY-MM-DD HH:MM:SS.SSS

Replies are listed 'Best First'.
Re^9: Time matching YYYY-MM-DD HH:MM:SS.SSS
by dave_the_m (Monsignor) on Jul 28, 2012 at 00:37 UTC
    The regex I used works against the sample data you supplied. Perhaps your real data is different. Perhaps you have tabs rather than spaces (so use \s), or perhaps some lines don't have any text after the timestamp?

    Dave.