#1215 Filter a line difference, not just the whole line

open
nobody
5
2015-02-02
2012-09-13
Anonymous
No

It would be great to be able to filter, and thus exclude differences that are just a specific match within a line.
For example, I want to compare two files where the only difference on a lot of lines is that one side ends in a semi colon, or () or something similar; but I STILL want to compare the rest of the line.... so that other differences in the line are shown.
I initially thought the current line filter could do this; but on close look it can't

Discussion

  • DFR
    DFR
    2013-02-04

    Could be done in LineFilters List by adding RegEx Like this one:
    ^[[:blank:]](MODIFIED)[[:blank:]]+(\w+)-(\w+)-(\w+)[[:blank:]]+(BY)[[:blank:]](.*)$/\6
    With Line: "MODIFIED 2013-02-04 BY ME OR OTHERONE" just "ME OR OTHER ONE" would be compared.

    PS: RegEx tested with SourceCookifier on NotePadd++

     
  • Simon
    Simon
    2013-02-15

    No it doesn't. The entire line gets removed from the difference check; and differences in the line are not shown.
    quoting from the help:
    Line filter matching can be described in terms of two ideas:

    When a rule matches any part of the line, the entire difference is ignored. Therefore, you cannot filter just part of a line. For example, suppose two files have the following single-line difference:

    File1:

    Jean Sibelius

    File2:

    Janne Sibelius

    With no filtering, the line is detected as a difference. But if we apply a line filter rule with the expression, ^#, the lines are reported as identical, because the expression specifies only the first character, which matches in both files.