No announcement yet.

How to compare to "don't care" values

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to compare to "don't care" values


    In the files I am comparing letter 'U' means the value is not important and can be substituted by any number [0-9ABCDEF]
    How to specify the rules to archieve following:

    LEFT FILE | RIGHT FILE | comment
    01234567 | UUUU4567 | //unimportant difference
    UUUU4567 | 00004567 | //unimportant difference.
    01234567 | 00004567 | //important difference.

    When I specify the grammar element "MyUndef=Text matching U+\s*" it in deed ignores the series of "UUUU"s but only on one side.
    I wish to have a rule e.g. : "Numbers are important compared to each other but not important when compared to 'U'"

  • #2

    Defining a grammar element will mark that element as Unimportant, but if Important text aligns to it, and is different, then that text will still be considered Important.

    It sounds like you would want to use the BC3 Pro feature Text Replacements (Text Compare Session Settings: Replacements tab). You can set up logical rules to match U to Numbers, or explicitely define U = 2 and 2 = U.
    Aaron P Scooter Software