How to ignore line if left side match a word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raist
    New User
    • Nov 2012
    • 1

    How to ignore line if left side match a word

    I'm comparing two files and I would like to ignore all the lines that contains the substring Profiler.GetLabel on the left file.
    For example I would like to consider the following files as identical:

    file 1 (left side):
    Code:
    string label = Profiler.GetLabel("FWCOMMON0336", Context.Lang);
    Console.WriteLine(label);
    file 2 (right side):
    Code:
    string label = "Hello";
    Console.WriteLine(label);

    Is it possible?

    Thanks
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    Unfortunately, this type of unimportance is not definable in BC3 (without some additional information).

    You could define the left line as Unimportant, but the right side would still be counted as an Important Difference.
    http://www.scootersoftware.com/suppo..._unimportantv3

    Alternatively, you could also use the BC3 Pro feature Text Replacements, and define a replacement of
    .* = string label = Profiler.GetLabel("FWCOMMON0336", Context.Lang);
    or
    .*Profiler.GetLabel.* = string label = "Hello";
    or
    (.*)Profiler.GetLabel.* = $1"Hello";

    But Text Replacements does not support a mask definition on both sides, so at least one side would need to use an explicit string.
    Aaron P Scooter Software

    Comment

    Working...