Skip to main content
Matches are instructions for matching lines of text in a document. They’re valid elements in anchors and other objects. See the following sections for more information: Match types Match arrays

Match types

Global parameters

The following parameters are available to most* types of Match objects. *These parameters aren’t available as top-level parameters for a Boolean match.

Simple match

Match using strings. Parameters SYNTAX EXAMPLE The following config uses a simple match:
JSON
For even simpler matching syntax in anchors, you can use "anchor":"some string to match". For more information see Anchor. EDIT DISTANCE EXAMPLE The following example shows setting the Edit Distance parameter on a simple match for a poor-quality photographed document, so that the anchor 6 City state and ZIP code matches the incorrect OCR output of 6 Chi state and ZIP code. Config
JSON
Example document
The following image shows the example document used with this example config:
Click to enlarge Output
JSON

Regex match

Match using a regular expression. Parameters Example For an example, see the Passthrough method example.

First match

This is a convenience match to find the first line encountered. Parameters Example This example matches the first line after a matched line in an array:
JSON

Boolean matches

Use Boolean matches to write Boolean logic about your matches. For example, use the Any match to match on an array of synonymous terms if a document contains small wording variations across revisions. Parameters EXAMPLE Config
JSON
Example document
The following image shows the example document used with this example config:
Click to enlarge Output
JSON

Match arrays

You can create complex matches by using any of the preceding match types in an array. For information, see match arrays.