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

3

7

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?

Aminoplast answered 21/4, 2015 at 6:23 Comment(4)
Did you try anything? Please post your regex here, or the question will be closed.Gibbie
I have tried wirh this - ^* @versionAminoplast
Check this Web site: regexfilterforw.sourceforge.net. I see the line filter is not working properly.Gibbie
Thanks, for reply. I have already checked that web site. But, it did not help me.Aminoplast
A
3

After many tries the following regular expression is working for me -

^ \* @version \$Revision:
Aminoplast answered 22/4, 2015 at 6:53 Comment(0)
H
10

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

Houri answered 20/12, 2016 at 17:16 Comment(1)
Mind blown. Thank you very useful :DFrosty
A
3

After many tries the following regular expression is working for me -

^ \* @version \$Revision:
Aminoplast answered 22/4, 2015 at 6:53 Comment(0)
S
1

Check the WinMerge release notes:

Filters only applied when using full compare.

Line filtering is only applied in folder compare when using Full Contents-compare method.

If you are using any other compare method, line filters are not applied. Files marked different in folder compare can get status changed to identical when opening them to file compare.

So, you will not be able to use regex to filter out the lines that are open in right/left pane.

You will have to install and use 3rd party filters, e.g. http://regexfilterforw.sourceforge.net/.

Spellbound answered 21/4, 2015 at 12:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.