Concepts
Match arrays
Note: If you’re familiar with Sensible, this detailed topic is for you. If you’re new to Sensible, see match.
Sensible matches the last element in a Match array if:
- Each array element targets a separate successive line in the document.
- The matches specified in the array occur in the document in the same order as in the array. For more information about line ordering, see Lines.
This example creates an Anchor line using the last element in the array:
JSON
Reverse match arrays
Use the Reverse parameter when a difficult-to-match target line precedes an easy-to-match line. You can match the easy line, then set "reverse:true"
to search preceding lines until you match the difficult line.
Config
JSON
Example document
The following image shows the example document used with this example config:
Example document | Download link |
---|
Output
JSON
Notes
In a reverse match array, Sensible searches for anchor candidates in sequence, and rules out overlapping match arrays. The following image illustrates this behavior for the example config: