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

sayantan rana picture sayantan rana · Apr 21, 2015 · Viewed 10.4k times · Source

I have many files containing following types of line -

* @version $Revision: 1.xxx  

I want this type of line to be ignored while comparing using winmerge. I have tried with line filters. But, till not able to do that. Can any one help me in this regard?

Answer

KyleMit picture KyleMit · Dec 20, 2016

You can actually do this with line filters.

  1. Select the filter option from the Selection Dialog
    Select Filter
  2. Go to the Linefilters tab, enable line filters and then compose a regular expression that matches lines you want to filter out.
    Line Filter
  3. In the results, it will highlight filtered lines in a different color, but it won't treat them as differences in the individual file or folder summary.
    Filtered Result

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

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

Regexr Demo