Announcement

Collapse
No announcement yet.

skip timestamp during compare

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • skip timestamp during compare

    Hi,

    I want to compare two logfiles that start with a timestamp that has to be ignored, but I cannot figure out how to.
    Text in the logfile is like "[2013-08-21 13:52:14] ..."

    I made a new FileFormat ('Logfile') with a regex grammar Timestamp: "^\[d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\]". In Session Settings I choose Format 'Logfile' and in Importance I uncheck 'timestamp'.
    However, in the compare windows, I still see lines that only differ in timestamp, although I click Ignore Unimportant Differences and Show Differences. I also tried this grammer: "^[d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}]"

    Any suggestions?

    Chris

  • #2
    Hello,

    You just have a small typo. Your first d{4} is missing the \.

    \d{4}

    Assuming your timestamp always starts at the very beginning of the line, this should otherwise be ok. You might want to remove the ^, or the [ and ] definitions. To troubleshoot a RegEx, it helps to make it smaller, then add parts back on until it breaks to see which aspect of the definition isn't working.
    Aaron P Scooter Software

    Comment

    Working...
    X