tags:

views:

771

answers:

2

I would like to ignore difference in lines, if one of the files has a line ending with //ignore is this possible? how would the regular expression for the line filter be written?

tried .*//ignore$ but this does not work

A: 

When you launch a file compare from the Select Files or Folders dialog, after choosing the Left and Right files, click Select next to the Filter field.

In the Filters dialog, click the Linefilters tab, create the following line filter (add)

^//ignore

Enable the line filters you want to use and run your comparison.

Have fun!

Sven
A: 

I found line filters to be very lacking. I developed regular expressions filter yesterday using Boost Regex library.

I feel it does the job.

https://sourceforge.net/projects/regexfilterforw/files/

Feel free to try.

could you give an example ? eg. if have two files, one somewhere containing this line: validationRuleSet.AddPropertyRuleSet("TitelId","TitelId")and the other containing this line validationRuleSet.AddPropertyRuleSet("TitelId","Titel") // customWinmerge marks this as a difference because 1) TitelId differs from Titel and of course also because // custom is appended in the second file.I would like to tell winmerge , to ignore this line as a difference because its marked with "// custom"
rekna
I think you should be able to do something like this in regexrules file.^.*//custom$This should tell winmerge to ignore any lines containing //customI'm not sure about / character. Maybe it needs to be escaped as^.*\/\/custom$