Compound output

Input:

Receipt.fp, date.yml

Command:

FormProcApp.exe Receipt.fp Example6 date.yml -l en-US

Output:

Receipt_date_0.json

This example demonstrates the use of compound outputs, which provide a convenient way to directly include the capture groups of a regex in the output.

- id: Date
  to-be-output: {Month: mon, Day: day, Year: year}
  rules:
  - [{re: '(date[:|]\s+)?(?<mon>\d\d)\D(?<day>\d\d)\D(?<year>\d\d)'}]
  - [{re: '(date[:|]\s+)?(?<mon>\d\d)\D(?<day>\d\d)\D(?<year>\d\d\d\d)'}]

Snippets from the generated Example6\Receipt_date_0.json reveal text parts captured by the regex under a similar name referredFields as for any anchor.

    "fields": [
            "id": "Date",
            "matches": [
                    "referredFields": [
                        {
                            "id": "Month",
                            "text": "08",
...
                        {
                            "id": "Day",
                            "text": "26",
...
                        {
                            "id": "Year",
                            "text": "08",