Winmerge : how to ignore differences in lines with a special ending tag

17,011

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!

Share:
17,011
rekna
Author by

rekna

Updated on June 14, 2022

Comments

  • rekna
    rekna about 2 years

    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

  • rekna
    rekna about 14 years
    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") // custom Winmerge 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"
  • user108570
    user108570 almost 14 years
    I think you should be able to do something like this in regexrules file. ^.*//custom$ This should tell winmerge to ignore any lines containing //custom I'm not sure about / character. Maybe it needs to be escaped as ^.*\/\/custom$
  • rekna
    rekna about 11 years
    it works using this regex (ignore lines containing the word 'custom' ) .*^((?!custom).)*.*
  • sydan
    sydan over 9 years
    This still doesn't seem to work for me, the .*^((?!custom).)*.* expression simply ignores all lines while the ^//ignore expression ignores none of them...