All Comparisons > Text Filters

Use this preference page to configure regular expressions-based filters for DeltaWalker to use when comparing text files using a text comparison algorithm.

The text filters preferences are a part of the All Comparisons preferences because they come into play in the following distinct scenarios:

  • When comparing text files. This is the obvious case as text filters, if configured, are always used when text files are opened for comparison in DeltaWalker's text editors.
  • When comparing folders and their contents using the comparison by content method, specifically when the "Use text comparison" option is selected—see the Folder Comparisons preference page. In that case, as DeltaWalker scans the content of the selected folder hierarchies, it analyzes the content type of every file using a sophisticated content type detection algorithm, and if files are detected as text files, they are compared using the selected text comparison algorithm and applying the selected text filters.

Filters ignore text that is outside the reviewer's interest, thus increasing the usefulness of the analysis performed and offered by DeltaWalker. They achieve this by narrowing the gap between the overly-technical representation of the text maintained by computers and the underlying meaning of the text expressed by humans.

A common real-world scenario showcasing text filters' value is when source code formatting is of no importance. Ease of use functions, such as ignoring whitespace, line endings or character case, are presented in the UI as actions, while in reality they are implemented as text filters.

Software developers can use text comparison filters to ignore code comments when comparing source files.


File comparison filters image

Filters at a glance

DeltaWalker makes it easy to define a large set of filters and use them suitably for specific comparison tasks. Filters are expressed through the de facto standard syntax of regular expressions and are given human-readable descriptions to lift off the burden of the mathematical notation and preserve the focus on the actual comparison review. Selective reuse of previously-defined filters is encouraged and aided by check boxes that control the inclusion or exclusion of specific filters during the actual comparison.

Filters offer fine-grained control over what text to ignore during comparison—from entire lines of text to specific character sequences.

Filters by example

Blank lines vs. sequences of "blank" characters

Consider the following regular expression that matches lines either with no characters or containing only spaces and tab characters (often referred to as blanks):

^[ \t]*$

A filter configured to search with this pattern and report any lines where it finds matching parts will make the comparison ignore such lines. The result—differences comprised only of such matching lines will be discarded.

In contrast, a filter built on the same expression and defined to ignore the respective character sequence will keep a matching line and its meaning as a base for a difference, but will let it correspond to another line, which may be non-blank in its raw form but which evaluates to a blank line after filtering.

See Also