Capture group

One column of a section: the text one capture group of the pattern matched.

Ingredient Family: textCaptureIngredients

Outline Display: {{columnName}} is capture group {{group}}{{mustNotMatch:, and must not contain {{mustNotMatch}}}}

Details

group counts the pattern’s capturing groups by their opening parentheses from the left, starting at 1. A non-capturing group, (?:...), takes no number, so use one for parentheses that are only there for alternation or to make a part optional. A group that took no part in the match – an optional part the section left out – gives the empty string. mustNotMatch is what keeps a section from carrying more than its pattern meant it to. A pattern that lets the text run to the end of the section also accepts a section holding a second header further in, and everything after that header would be filed under the first. Naming the header pattern here refuses such a section instead. The search is unanchored: the text is refused if the pattern matches anywhere in it.

Local scope

The parent slot binds these (look up the slot in the parent to see how):

  • $captureTable – The table collecting the captured columns

Settings

Required

  • columnName : new column (type: text; required, non-nullable)
    The name of the column the captured text lands in

  • group : constant value (type: integer; required, non-nullable)
    Which capture group of the pattern this column reads, counting opening parentheses from 1

Optional

  • mustNotMatch : constant value (type: text; optional)
    A regex the captured text must not match anywhere; a section whose text does is refused. Leave unset for no such rule.