How to ignore parts of your file

Ignoring headers, comments, RegExDates as unimportant

Sometimes your files have some some trivial part that you want to ignore when using Beyond Compare. There are several ways to do this.

For this example we will look at a pair of files in C language:

#1 Tell Beyond Compare to always skip the first x lines of all files

This way is crude but easy.

From the menu:

1. Session->SessionSettings->Importance->EditGrammar->Grammar->[+]

2. Then choose Category->Lines. Set that window similar to mine below. Then, you must go and UNcheck the box that calls that rule important:

If you want BC to evaluate all of the files in a Folder Compare session using this rule:

3. You can choose Session->SessionSettings->Importance and select AlsoUpdateSessionDefaults

#2 For computer code, you can tell BC to detect the language and ignore comments in that language

By default, Beyond Compare detects many languages based on the dot extension on the filename, including C languages, Cobol, Delphi, Java, Javascript, Perl, Python, SQL, and visual Basic. More can be downloaded from Scooter Software. If your file is in one of these languages, Beyond Compare will automatically mark any comments as unimportant. When you look at your file, you will see red and blue color highlighting. The red is to show you the really significant things, the important differences. The blue color is to show you things that are different but that you might not care about, like different whitespace, different capitalizations, and, as we are interested in here, different comments. If you really want to not see the blue, unimportant differences, you can turn the highlighting from blue to nothing at all by hitting the MINOR button.

#3 To ignore a date, you can make a Regular Expression

The most computer-scienceish way to ignore things is with a mask or a regular expression. The mask is an asterisk wildcard combined with the string of the thing you are ignoring.