How to ignore a line containing a specific word using winmerge line filters?

I have many files containing the following types of strings -

* @version $Revision: 1.xxx  

      

I want this line type to be ignored when comparing using winmerge. I've tried with line filters. But, I haven't been able to do it yet. Can anyone help me in this regard?

+3


source to share


3 answers


After many tries the following regex works for me -



^ \* @version \$Revision:

      

+2


source


You can do this with line filters .

  1. Select a filter option in the selection dialog
    Select Filter
  2. Go to the Linefilters tab, enable line filters, and then compose a regex that matches the lines you want to filter.
    Line Filter
  3. As a result, it will highlight the filtered lines in a different color, but will not treat them as differences in the summary for individual files or folders.
    Filtered result



For your particular case, you'll want to look for a regex pattern that matches your naming convention, but something like this should work:

@version \$Revision: \d\.\d*

Regexr Demo

+5


source


Check out the WinMerge release notes :

Filters are only applied when using a full comparison .

Linear filtering is only applied when matching folders when using Full Contents-Compare .

If you use any other comparison method, no line filters are applied. Files marked as different in the folder comparison may get the status changed to identical when opening the file.

Thus, you won't be able to use regex to filter the lines opened in the right / left pane.

You will need to install and use third party filters for example. http://regexfilterforw.sourceforge.net/ .

0


source







All Articles