Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore small difference between numbers in Beyond Compare

I have 2 files with some number values in it and I want to compare them using Beyond Compare. But if the difference between two numbers is small enough, I want Beyond Compare to ignore those differences.

For example, I have the file named file1.txt with the values:

value1: 10
value2: 8.2
value3: 5.7

and the second file named file2.txt with the values:

value1: 8
value2: 8.4
value3: 6.3

I want Beyond Compare to show me differences only where the difference between two numbers is greater than 0.5, in this case, on line 1 and line 3.

Can someone tell me how could I do that? I tried with regular expressions but I didn't succeed.

EDIT:

I tried the answer @Chris Kennedy told, and this is the outcome:

printscreen

like image 682
CristianLuca Avatar asked Feb 15 '16 12:02

CristianLuca


1 Answers

Beyond Compare's Text Compare doesn't support ignoring differences with a numeric tolerance. It can only ignore differences based on text matching using regular expressions or text delimiters.

Beyond Compare 3's Data Compare (Table Compare in BC4) does support numeric tolerances. Load files the Data Compare, then click on the Rules toolbar button (referee icon). Go to the Columns tab. Double click on a column to edit it. Uncheck "Use default". Set the Type dropdown to Numeric. Enter a numeric tolerance. Note that Numeric Tolerance isn't available if Key is checked in the column settings.

like image 61
Chris Kennedy Avatar answered Oct 26 '22 01:10

Chris Kennedy