Open mykael22000 opened 3 years ago
Which version of WinMerge are you using?
WinMerge 2.16.12 solves the problem when ^ is specified as a regular expression.
However, keep in mind that in the current implementation, these Substitution Filters work on a diff block basis, not on a line basis. In other words, if there is even one line that does not match as a result of replacing the inside of the Diff block, the lines of the entire Diff block will be regarded as not matching.
For things like log files, I recommend using the PrediffLineFilter.sct plugin instead of Substitution Filters.
Enter the regular expression in the Plugins Settings dialog as shown below and apply PrediffLineFilter.sct.
Nice feature, but it only seems to be working on the first few lines of my files.
I'm comparing a couple of large trace files and each line starts with a timestamp. Naturally, they are all different. I want to be able to ignore the timestamps and compare the text on each line.
The timestamps are in the format yyyy-mm-dd hh:mm:ss.sss
I've set up a substitution filter to replace:
^[0123456789\-]{10} [0123456789\:\.]{12}
with:yyyy-mm-dd hh:mm:ss.sss
Seems to work for the first 20 or so lines of the file - but not the next several thousand... :-(
The lines it does work for are displaying their original text in black and white, looking like the line is considered a match. Should there be a 'match after substuitution/ignore text' indicator?
Tried it on regexer.com and the pattern match the timestamp on lines it worked for and the lines it didn't.
It works for an initial set of lines, correctly concludes that two lines without the timestamp match and then fails on the next block of lines with timestamps.
Hmmm. If I delete the matching lines it doesn't work for any of the timestamps.
Are they being highlit because they are adjacent to lines with non-suppressed differences? Part of the same change block?
For what I want to do, lines that are the same after substitution should never be highlit. I just want to pretend that the timestamp fields always match...
Inserting matching blank lines doesn't change anything, but inserting matching 'X's does - it works for the section between the X's where the text also matches. Also seems to be able to get it to work, sort of, for bits further down the file.
Also only seems to work with the default comparison algorithm. The other algorithms just highlight every row with a timestamp.