Zyxer22
Zyxer22

Reputation: 152

How do I set two different words to be equal in beyond compare 3

I'm trying to diff different versions of a program. The older version uses 1 and 0 to represent true and false while the new version uses the words true and false. Since these boolean values are everywhere, most of the file is 'different.' For now I've added 1,0,false,and true to unimportant in a custom file type, but this has a few unfortunate side effects (like not matching a 1 that changed to false.) So, does anyone know how to make true match to 1 and false to 0?

edit:

The language is a proprietary one for my company, but it's relatable to sql. An example of what I mean would be

select *
from fake_table ft
where ft.active_ind = 1

becomes

select *
from fake_table ft
where ft.active_ind = true

Upvotes: 1

Views: 339

Answers (1)

Chris Kennedy
Chris Kennedy

Reputation: 2899

If you have a Beyond Compare 3 or 4 Pro license, you can use Replacements in the Text Compare to show the differences as a match. Replacements are a pro only feature, if you have a BC3 or BC4 Standard license, then you'll have to use unimportant text.

  1. In the Text Compare, click the Rules toolbar button (referee icon).
  2. Go to the Replacements tab. Click New (BC3) or + (BC4).
  3. Text to find: 1
  4. Replace with: True

After you define the replacements, 1 on the left matched with True on the right will be colored as a match if View > Ignore Unimportant Differences is on.

Upvotes: 1

Related Questions