I'm desperately trying to compare two files. All lines starting with a '#' should be ignored by comparing as they are meaningless in both files. As there are so many of them, it's nearly impossible to compare files "manually" if these lines show up as differences. I've tried any imaginable combination of options but it wont work. What am I doing wrong?
My simplest approach was setting R1 to "^#", leaving R2 empty, setting Files to "All Files" (compared files have extension "txt") and setting action to "Ignore String with match". Another one was setting R1 to "^[^#].*", leaving R2 empty and setting action to "Ignore lines not matching R1".
Neither worked. What can I do to exclude lines beginning with '#' from comparison?
While writing this, I came across another surely useful detail: The problem arises only, if there is no matching line in the other file, means "#foo" and "#bar" are considered equal by comparison, but if there ist a line "#foo" in one file and no corresponding line in the other file, the #foo-line shows up as a difference.
That is not what I expect when saying to ignore something, but maybe it's the intended behaviour of the program, leaving no option for me to get my comparison done?
Regular expression with not matched lines (V 4.0.1.2144)
That was my first attempt .grigsoft wrote:Even easier, ^# + "Ignore string with match" rule.
That's the point! Using that option it works fine in both cases. Thank you !grigsoft wrote:Note that after this, all # lines are considered to be empty, so you need to add "ignore inserted empty lines" too.
One little remark: At least the "Ignore lines not matching R1"-option should ignore the lines even if not matched in the other file. Otherwise it should be renamed in "Consider lines not matching R1 as empty". That would directly lead to using the "ignore inserted empty lines"-option.