Skip to content

Business messages

Reservation confirmations sent as email: reservation number, rate, each surcharge as stated, tax, total, pick-up and return with place, date and 24-hour time, car group and the renter's numbers.

input.txtHover a value to see its type · click it to find it in the treeRun in Studio
Subject: Avis Real-Time Reservations Confirmation

Avis Real-Time Reservations Confirmation
----------------------------------------------------------------------
NOTE: If you cancelled your reservation immediately after processing,
      please disregard this confirmation.
----------------------------------------------------------------------
Thank you for choosing Avis.  The following information was calculated
based on the information shown below that you provided to us.  Changes
in pick-up or return location, car group, dates or times may change
this rate.  This rate is for renters 25 years of age or older with a
major credit card in their name.
----------------------------------------------------------------------
Listed below is your reservation confirmation:
----------------------------------------------------------------------
Reservation Number.......: 35762788US5

Your rate for the  3 day
   period is.............:      74.26 - USD
Mileage..................: Unlimited free Miles/Kilometers

Surcharge................: (Up to) $1.93 per day (Vehicle License Fee)
Tax......................: 7.750 %
Approximate Total........: 85.81 - USD
----------------------------------------------------------------------
You requested a reservation for:
----------------------------------------------------------------------
Pick-Up Location.........: John Wayne Airport - SNA
Pick-Up Date.............: Friday May 26, 2000
Pick-Up Time.............: 7:00 PM (1900)

Return Location..........: John Wayne Airport - SNA
Return Date..............: Monday May 29, 2000
Return Time..............: 4:00 PM (1600)

Car Group................: Intermediate-Pontiac Grand Am or similar

Name.....................: DANA WELLS
AWD#.....................: L602318
Frequent Flyer#..........: CONTINENTAL AIRLINES QM820614
----------------------------------------------------------------------
For additional information on the "Pick-Up Location", please go to:

http://www.avis.com/L/?STAMNE=SNA

If you need to REVIEW or CANCEL this reservation, please go to:

http://www.avis.com/R/?RES_NO=35762788US5&LASTNAME=WELLS

You will need both your Reservation Number (35762788US5) and Last
Name (WELLS) to enter.

If you did not make this reservation, please send an e-mail with the
above rental information to:

[email protected]

Debit, Check, or Cash Cards are not accepted as credit identification
at the beginning of an auto rental.  An Avis honored charge card or an
Avis Cash Pre-payment ID Card is required at the beginning of the
rental.  Debit, Check, or Cash Cards can be used at the end of the
rental for payment of rental charges.
----------------------------------------------------------------------
Thank you for booking your auto with Avis Rent A Car.

Avis Rent A Car: http://www.avis.com/
----------------------------------------------------------------------
US/BB-CR/L
-----
Subject: Avis Real-Time Reservations Confirmation

Avis Real-Time Reservations Confirmation
----------------------------------------------------------------------
NOTE: If you cancelled your reservation immediately after processing,
      please disregard this confirmation.
----------------------------------------------------------------------
Thank you for choosing Avis.  The following information was calculated
based on the information shown below that you provided to us.  Changes
in pick-up or return location, car group, dates or times may change
this rate.  This rate is for renters 25 years of age or older with a
major credit card in their name.
----------------------------------------------------------------------
Listed below is your reservation confirmation:
----------------------------------------------------------------------
Reservation Number.......: 41260969US1

Your rate for the  5 day
   period is.............:     257.00 - USD
Mileage..................: Unlimited free Miles/Kilometers

Additional surcharges (some of which are mandatory) may apply to this
booking.

Tax......................: 19.600 %
----------------------------------------------------------------------
You requested a reservation for:
----------------------------------------------------------------------
Pick-Up Location.........: Nice Airport - NCE
Pick-Up Date.............: Thursday September 21, 2000
Pick-Up Time.............: 12:00 PM (1200)

Return Location..........: Nice Airport - NCE
Return Date..............: Tuesday September 26, 2000
Return Time..............: 12:00 PM (1200)

Car Group................: Group I - Renault Megane Convertible or similar

Name.....................: DANA WELLS
AWD#.....................: L602318
Frequent Flyer#..........:  QM820614
----------------------------------------------------------------------
For additional information on the "Pick-Up Location", please go to:

http://www.avis.com/L/?STAMNE=NCE

If you need to REVIEW or CANCEL this reservation, please go to:

http://www.avis.com/R/?RES_NO=41260969US1&LASTNAME=WELLS

You will need both your Reservation Number (41260969US1) and Last
Name (WELLS) to enter.

If you did not make this reservation, please send an e-mail with the
above rental information to:

[email protected]

Debit, Check, or Cash Cards are not accepted as credit identification
at the beginning of an auto rental.  An Avis honored charge card or an
Avis Cash Pre-payment ID Card is required at the beginning of the
rental.  Debit, Check, or Cash Cards can be used at the end of the
rental for payment of rental charges.
----------------------------------------------------------------------
Thank you for booking your auto with Avis Rent A Car.

Avis Rent A Car: http://www.avis.com/
----------------------------------------------------------------------
US/BB-CR/L
-----
Subject: Avis Real-Time Reservations Confirmation

Avis Real-Time Reservations Confirmation
----------------------------------------------------------------------
NOTE: If you cancelled your reservation immediately after processing,
      please disregard this confirmation.
----------------------------------------------------------------------
Thank you for choosing Avis.  The following information was calculated
based on the information shown below that you provided to us.  Changes
in pick-up or return location, car group, dates or times may change
this rate.  This rate is for renters 25 years of age or older with a
major credit card in their name.
----------------------------------------------------------------------
Listed below is your reservation confirmation:
----------------------------------------------------------------------
Reservation Number.......: 30134505US2

Your rate for the  2 day
   period is.............:      59.82 - USD
Mileage..................: Unlimited free Miles/Kilometers

Surcharge................: $0.75 per day (Customer Contract Fee) + 11.11% (Concession Recovery Fee)
Tax......................: 6.000 %
Approximate Total........: 72.05 - USD
----------------------------------------------------------------------
You requested a reservation for:
----------------------------------------------------------------------
Pick-Up Location.........: Newark Intl Airport - EWR
Pick-Up Date.............: Friday August 03, 2001
Pick-Up Time.............: 4:00 PM (1600)

Return Location..........: Newark Intl Airport - EWR
Return Date..............: Sunday August 05, 2001
Return Time..............: 4:00 PM (1600)

Car Group................: Group C - Pontiac Grand Am or similar

Name.....................: DANA WELLS
AWD#.....................: L602318
Frequent Flyer#..........: CONTINENTAL AIRLINES QM820614
----------------------------------------------------------------------
For additional information on the "Pick-Up Location", please go to:

http://www.avis.com/L/?STAMNE=EWR

If you need to REVIEW or CANCEL this reservation, please go to:

http://www.avis.com/R/?RES_NO=30134505US2&LASTNAME=WELLS

You will need both your Reservation Number (30134505US2) and Last
Name (WELLS) to enter.

If you did not make this reservation, please send an e-mail with the
above rental information to:

[email protected]

Debit, Check, or Cash Cards are not accepted as credit identification
at the beginning of an auto rental.  An Avis honored charge card or an
Avis Cash Pre-payment ID Card is required at the beginning of the
rental.  Debit, Check, or Cash Cards can be used at the end of the
rental for payment of rental charges.
----------------------------------------------------------------------
Thank you for booking your auto with Avis Rent A Car.

Avis Rent A Car: http://www.avis.com/
----------------------------------------------------------------------
US/BB-CR/L
business-messages.ymlspec
Money:
  $local:
    Group: '\d+'
    Fraction: '\d+'
    Amount:
      $fields:
        groups: { $type: 'Group[]', $separator: ',' }
        fraction: Fraction
      $patterns: '#{groups}(\.#{fraction})?'
      $value: '#{groups}[.#{fraction}]'
    Currency: [ '[A-Z]{3}', '\$', '€', '£' ]
  $fields: { amount: Amount, currency: Currency }
  $patterns:
    - '#{amount} ?-? ?#{currency}'
    - '#{currency} ?#{amount}'
  $value: { amount: '#{amount}', currency: '#{currency}' }

Percent:
  $local: { Number: '\d+(\.\d+)?' }
  $fields: { number: Number }
  $patterns: '#{number} ?%'
  $value: '#{number}'

Date:
  $local:
    Weekday: '(Mon|Tues|Wednes|Thurs|Fri|Satur|Sun)day|Mon|Tue|Wed|Thu|Fri|Sat|Sun'
    Month:
      January: { $patterns: [ 'January', 'Jan' ], $value: '01' }
      February: { $patterns: [ 'February', 'Feb' ], $value: '02' }
      March: { $patterns: [ 'March', 'Mar' ], $value: '03' }
      April: { $patterns: [ 'April', 'Apr' ], $value: '04' }
      May: { $patterns: 'May', $value: '05' }
      June: { $patterns: [ 'June', 'Jun' ], $value: '06' }
      July: { $patterns: [ 'July', 'Jul' ], $value: '07' }
      August: { $patterns: [ 'August', 'Aug' ], $value: '08' }
      September: { $patterns: [ 'September', 'Sept?' ], $value: '09' }
      October: { $patterns: [ 'October', 'Oct' ], $value: '10' }
      November: { $patterns: [ 'November', 'Nov' ], $value: '11' }
      December: { $patterns: [ 'December', 'Dec' ], $value: '12' }
    Day: '[0-3]\d'
    Year: '\d{4}'
  $fields: { month: Month, day: Day, year: Year }
  $patterns:
    - '(${Weekday},? )?#{month}\.? #{day},? #{year}'
    - '(${Weekday},? )?#{day} #{month}\.?,? #{year}'
  $value: '#{year}-#{month}-#{day}'

  SingleDigitDay:
    $local: { Day: '[1-9]' }
    $value: '#{year}-#{month}-0#{day}'

Time:
  $local:
    Hour: '[01]\d|2[0-3]'
    Minute: '[0-5]\d'
    Clock: '\d{1,2}:\d{2} ?(AM|PM|am|pm|a\.m\.|p\.m\.)'
  $fields: { hour: Hour, minute: Minute }
  $patterns:
    - '${Clock} \(#{hour}:?#{minute}\)'
    - '#{hour}:#{minute}'
  $value: '#{hour}:#{minute}'

  Morning:
    $local:
      Hour:
        H00: { $patterns: '12', $value: '00' }
        H01: { $patterns: '0?1', $value: '01' }
        H02: { $patterns: '0?2', $value: '02' }
        H03: { $patterns: '0?3', $value: '03' }
        H04: { $patterns: '0?4', $value: '04' }
        H05: { $patterns: '0?5', $value: '05' }
        H06: { $patterns: '0?6', $value: '06' }
        H07: { $patterns: '0?7', $value: '07' }
        H08: { $patterns: '0?8', $value: '08' }
        H09: { $patterns: '0?9', $value: '09' }
        H10: { $patterns: '10', $value: '10' }
        H11: { $patterns: '11', $value: '11' }
    $patterns: '#{hour}:#{minute} ?(AM|am|a\.m\.)'

  Afternoon:
    $local:
      Hour:
        H12: { $patterns: '12', $value: '12' }
        H13: { $patterns: '0?1', $value: '13' }
        H14: { $patterns: '0?2', $value: '14' }
        H15: { $patterns: '0?3', $value: '15' }
        H16: { $patterns: '0?4', $value: '16' }
        H17: { $patterns: '0?5', $value: '17' }
        H18: { $patterns: '0?6', $value: '18' }
        H19: { $patterns: '0?7', $value: '19' }
        H20: { $patterns: '0?8', $value: '20' }
        H21: { $patterns: '0?9', $value: '21' }
        H22: { $patterns: '10', $value: '22' }
        H23: { $patterns: '11', $value: '23' }
    $patterns: '#{hour}:#{minute} ?(PM|pm|p\.m\.)'

Fee:
  $local:
    Bound: { $patterns: '\(?up to\)?', $value: 'up to' }
    Unit:
      Day: { $patterns: [ 'day', '24 hours' ], $value: 'day' }
      Week: { $patterns: 'week', $value: 'week' }
      Hour: { $patterns: 'hour', $value: 'hour' }
      Rental: { $patterns: [ 'rental', 'rental period', 'rental agreement' ], $value: 'rental' }
      Mile: { $patterns: [ 'mile', 'mi' ], $value: 'mile' }
      Kilometer: { $patterns: [ 'kilometer', 'kilometre', 'km' ], $value: 'kilometer' }
    Name: '\p{L}[\p{L}\p{N}''&/\- ]*'
  $flags: [ CASE_INSENSITIVE ]
  $fields: { name: Name }

  Charge:
    $fields: { bound: Bound, amount: Money, per: Unit }
    $patterns: '(#{bound} )?#{amount}( (per|/|a|an) ?#{per})? \(#{name}\)'

  Share:
    $fields: { percent: Percent }
    $patterns: '#{percent} \(#{name}\)'

Entry:
  $flags: [ MULTILINE, CASE_INSENSITIVE ]
  $local:
    Leader: '[ .]*:[ \t]*'

  ReservationNumber:
    $local: { Code: { $flags: [ -CASE_INSENSITIVE ], $patterns: '[A-Z0-9]+' } }
    $fields: { number: Code }
    $patterns: '^(Reservation|Confirmation) (Number|No\.?|#)${Leader}#{number}'
    $value: '#{number}'

  Rate:
    $flags: [ FLEXIBLE_WHITESPACE ]
    $local: { Days: '\d+' }
    $fields: { days: Days, rate: Money }
    $patterns: '^Your rate for the #{days} days? period is${Leader}#{rate}'

  Surcharges:
    $fields:
      fees: { $type: 'Fee[]', $separator: ' ?(\+|,|and) ?' }
    $patterns: '^Surcharges?${Leader}#{fees}'

  Tax:
    $fields: { rate: Percent }
    $patterns: '^Tax(es)?( rate)?${Leader}#{rate}'
    $value: '#{rate}'

  Total:
    $fields: { total: Money }
    $patterns: '^(Approximate|Estimated) Total${Leader}#{total}'
    $value: { amount: '#{total.amount}', currency: '#{total.currency}' }

  Stop:
    $local:
      Location:
        $local:
          Name: '[\p{L}\p{N}][\p{L}\p{N}.,''&/() \-]*?'
          Code: { $flags: [ -CASE_INSENSITIVE ], $patterns: '[A-Z]{3}' }
        $fields: { name: Name, code: Code }
        $patterns: '#{name}( - #{code})?[ \t]*$'
        $value: { name: '#{name}', code: '[#{code}]' }
    $fields: { location: Location, date: Date, time: Time }
    $patterns: '^${Event} (Location${Leader}#{location}|Date${Leader}#{date}|Time${Leader}#{time})(\n${Event} (Location${Leader}#{location}|Date${Leader}#{date}|Time${Leader}#{time}))*'

    PickUp:
      $local: { Event: 'Pick-?up' }

    Return:
      $local: { Event: 'Return|Drop-?off' }

  CarGroup:
    $local: { Text: '[\p{L}\p{N}][\p{L}\p{N}\p{P} ]*' }
    $fields: { group: Text }
    $patterns: '^Car (Group|Class|Type)${Leader}#{group}'
    $value: '#{group}'

  Renter:
    $local: { Name: '\p{L}[\p{L}''.\- ]*' }
    $fields: { name: Name }
    $patterns: '^(Renter )?Name${Leader}#{name}'
    $value: '#{name}'

  Discount:
    $local: { Code: { $flags: [ -CASE_INSENSITIVE ], $patterns: '[A-Z0-9]+' } }
    $fields: { number: Code }
    $patterns: '^(AWD|Avis Worldwide Discount|Discount)( Number| No\.?)?#?${Leader}#{number}'
    $value: '#{number}'

  FrequentFlyer:
    $local:
      Program: '\p{L}[\p{L}''&.\-]*( \p{L}[\p{L}''&.\-]*)*'
      Code: { $flags: [ -CASE_INSENSITIVE ], $patterns: '[A-Z0-9]*\d[A-Z0-9]*' }
    $fields: { program: Program, number: Code }
    $patterns: '^Frequent Fl(y|i)er( Number| No\.?)?#?${Leader}(#{program} )?#{number}'

Reservation:
  $flags: [ MULTILINE ]
  $local:
    Other: '[\p{L}\p{N}\p{P}\p{S} \t]+'
  $fields:
    number: Entry::ReservationNumber
    rate: Entry::Rate
    surcharges: Entry::Surcharges
    tax: Entry::Tax
    total: Entry::Total
    pickUp: Entry::Stop::PickUp
    return: Entry::Stop::Return
    carGroup: Entry::CarGroup
    renter: Entry::Renter
    discount: Entry::Discount
    frequentFlyer: Entry::FrequentFlyer
  $patterns: '#{number}(\n+(${Other}\n+)*?(#{rate}|#{surcharges}|#{tax}|#{total}|#{pickUp}|#{return}|#{carGroup}|#{renter}|#{discount}|#{frequentFlyer}))+'
$ texomy parse input.txt -m business-messages
business-messages.json
[
  {
    "type": "Reservation",
    "start": 847,
    "end": 1818,
    "fields": {
      "number": {
        "type": "Entry::ReservationNumber",
        "start": 847,
        "end": 885,
        "fields": {
          "number": {
            "type": "Code",
            "start": 874,
            "end": 885,
            "text": "35762788US5"
          }
        },
        "value": "35762788US5"
      },
      "rate": {
        "type": "Entry::Rate",
        "start": 887,
        "end": 955,
        "fields": {
          "days": {
            "type": "Days",
            "start": 906,
            "end": 907,
            "text": "3"
          },
          "rate": {
            "type": "Money",
            "start": 944,
            "end": 955,
            "fields": {
              "amount": {
                "type": "Amount",
                "start": 944,
                "end": 949,
                "fields": {
                  "groups": [
                    {
                      "type": "Group",
                      "start": 944,
                      "end": 946,
                      "text": "74"
                    }
                  ],
                  "fraction": {
                    "type": "Fraction",
                    "start": 947,
                    "end": 949,
                    "text": "26"
                  }
                },
                "value": "74.26"
              },
              "currency": {
                "type": "Currency",
                "start": 952,
                "end": 955,
                "text": "USD"
              }
            },
            "value": {
              "amount": "74.26",
              "currency": "USD"
            }
          }
        }
      },
      "surcharges": {
        "type": "Entry::Surcharges",
        "start": 1016,
        "end": 1086,
        "fields": {
          "fees": [
            {
              "type": "Fee::Charge",
              "start": 1043,
              "end": 1086,
              "fields": {
                "name": {
                  "type": "Name",
                  "start": 1066,
                  "end": 1085,
                  "text": "Vehicle License Fee"
                },
                "bound": {
                  "type": "Bound",
                  "start": 1043,
                  "end": 1050,
                  "text": "(Up to)",
                  "value": "up to"
                },
                "amount": {
                  "type": "Money",
                  "start": 1051,
                  "end": 1056,
                  "fields": {
                    "amount": {
                      "type": "Amount",
                      "start": 1052,
                      "end": 1056,
                      "fields": {
                        "groups": [
                          {
                            "type": "Group",
                            "start": 1052,
                            "end": 1053,
                            "text": "1"
                          }
                        ],
                        "fraction": {
                          "type": "Fraction",
                          "start": 1054,
                          "end": 1056,
                          "text": "93"
                        }
                      },
                      "value": "1.93"
                    },
                    "currency": {
                      "type": "Currency",
                      "start": 1051,
                      "end": 1052,
                      "text": "$"
                    }
                  },
                  "value": {
                    "amount": "1.93",
                    "currency": "$"
                  }
                },
                "per": {
                  "type": "Unit::Day",
                  "start": 1061,
                  "end": 1064,
                  "text": "day",
                  "value": "day"
                }
              }
            }
          ]
        }
      },
      "tax": {
        "type": "Entry::Tax",
        "start": 1087,
        "end": 1121,
        "fields": {
          "rate": {
            "type": "Percent",
            "start": 1114,
            "end": 1121,
            "fields": {
              "number": {
                "type": "Number",
                "start": 1114,
                "end": 1119,
                "text": "7.750"
              }
            },
            "value": "7.750"
          }
        },
        "value": "7.750"
      },
      "total": {
        "type": "Entry::Total",
        "start": 1122,
        "end": 1160,
        "fields": {
          "total": {
            "type": "Money",
            "start": 1149,
            "end": 1160,
            "fields": {
              "amount": {
                "type": "Amount",
                "start": 1149,
                "end": 1154,
                "fields": {
                  "groups": [
                    {
                      "type": "Group",
                      "start": 1149,
                      "end": 1151,
                      "text": "85"
                    }
                  ],
                  "fraction": {
                    "type": "Fraction",
                    "start": 1152,
                    "end": 1154,
                    "text": "81"
                  }
                },
                "value": "85.81"
              },
              "currency": {
                "type": "Currency",
                "start": 1157,
                "end": 1160,
                "text": "USD"
              }
            },
            "value": {
              "amount": "85.81",
              "currency": "USD"
            }
          }
        },
        "value": {
          "amount": "85.81",
          "currency": "USD"
        }
      },
      "pickUp": {
        "type": "Entry::Stop::PickUp",
        "start": 1336,
        "end": 1476,
        "fields": {
          "location": {
            "type": "Location",
            "start": 1363,
            "end": 1387,
            "fields": {
              "name": {
                "type": "Name",
                "start": 1363,
                "end": 1381,
                "text": "John Wayne Airport"
              },
              "code": {
                "type": "Code",
                "start": 1384,
                "end": 1387,
                "text": "SNA"
              }
            },
            "value": {
              "name": "John Wayne Airport",
              "code": "SNA"
            }
          },
          "date": {
            "type": "Date",
            "start": 1415,
            "end": 1434,
            "fields": {
              "month": {
                "type": "Month::May",
                "start": 1422,
                "end": 1425,
                "text": "May",
                "value": "05"
              },
              "day": {
                "type": "Day",
                "start": 1426,
                "end": 1428,
                "text": "26"
              },
              "year": {
                "type": "Year",
                "start": 1430,
                "end": 1434,
                "text": "2000"
              }
            },
            "value": "2000-05-26"
          },
          "time": {
            "type": "Time",
            "start": 1462,
            "end": 1476,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 1471,
                "end": 1473,
                "text": "19"
              },
              "minute": {
                "type": "Minute",
                "start": 1473,
                "end": 1475,
                "text": "00"
              }
            },
            "value": "19:00"
          }
        }
      },
      "return": {
        "type": "Entry::Stop::Return",
        "start": 1478,
        "end": 1618,
        "fields": {
          "location": {
            "type": "Location",
            "start": 1505,
            "end": 1529,
            "fields": {
              "name": {
                "type": "Name",
                "start": 1505,
                "end": 1523,
                "text": "John Wayne Airport"
              },
              "code": {
                "type": "Code",
                "start": 1526,
                "end": 1529,
                "text": "SNA"
              }
            },
            "value": {
              "name": "John Wayne Airport",
              "code": "SNA"
            }
          },
          "date": {
            "type": "Date",
            "start": 1557,
            "end": 1576,
            "fields": {
              "month": {
                "type": "Month::May",
                "start": 1564,
                "end": 1567,
                "text": "May",
                "value": "05"
              },
              "day": {
                "type": "Day",
                "start": 1568,
                "end": 1570,
                "text": "29"
              },
              "year": {
                "type": "Year",
                "start": 1572,
                "end": 1576,
                "text": "2000"
              }
            },
            "value": "2000-05-29"
          },
          "time": {
            "type": "Time",
            "start": 1604,
            "end": 1618,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 1613,
                "end": 1615,
                "text": "16"
              },
              "minute": {
                "type": "Minute",
                "start": 1615,
                "end": 1617,
                "text": "00"
              }
            },
            "value": "16:00"
          }
        }
      },
      "carGroup": {
        "type": "Entry::CarGroup",
        "start": 1620,
        "end": 1687,
        "fields": {
          "group": {
            "type": "Text",
            "start": 1647,
            "end": 1687,
            "text": "Intermediate-Pontiac Grand Am or similar"
          }
        },
        "value": "Intermediate-Pontiac Grand Am or similar"
      },
      "renter": {
        "type": "Entry::Renter",
        "start": 1689,
        "end": 1726,
        "fields": {
          "name": {
            "type": "Name",
            "start": 1716,
            "end": 1726,
            "text": "DANA WELLS"
          }
        },
        "value": "DANA WELLS"
      },
      "discount": {
        "type": "Entry::Discount",
        "start": 1727,
        "end": 1761,
        "fields": {
          "number": {
            "type": "Code",
            "start": 1754,
            "end": 1761,
            "text": "L602318"
          }
        },
        "value": "L602318"
      },
      "frequentFlyer": {
        "type": "Entry::FrequentFlyer",
        "start": 1762,
        "end": 1818,
        "fields": {
          "program": {
            "type": "Program",
            "start": 1789,
            "end": 1809,
            "text": "CONTINENTAL AIRLINES"
          },
          "number": {
            "type": "Code",
            "start": 1810,
            "end": 1818,
            "text": "QM820614"
          }
        }
      }
    }
  },
  {
    "type": "Reservation",
    "start": 3739,
    "end": 4673,
    "fields": {
      "number": {
        "type": "Entry::ReservationNumber",
        "start": 3739,
        "end": 3777,
        "fields": {
          "number": {
            "type": "Code",
            "start": 3766,
            "end": 3777,
            "text": "41260969US1"
          }
        },
        "value": "41260969US1"
      },
      "rate": {
        "type": "Entry::Rate",
        "start": 3779,
        "end": 3847,
        "fields": {
          "days": {
            "type": "Days",
            "start": 3798,
            "end": 3799,
            "text": "5"
          },
          "rate": {
            "type": "Money",
            "start": 3835,
            "end": 3847,
            "fields": {
              "amount": {
                "type": "Amount",
                "start": 3835,
                "end": 3841,
                "fields": {
                  "groups": [
                    {
                      "type": "Group",
                      "start": 3835,
                      "end": 3838,
                      "text": "257"
                    }
                  ],
                  "fraction": {
                    "type": "Fraction",
                    "start": 3839,
                    "end": 3841,
                    "text": "00"
                  }
                },
                "value": "257.00"
              },
              "currency": {
                "type": "Currency",
                "start": 3844,
                "end": 3847,
                "text": "USD"
              }
            },
            "value": {
              "amount": "257.00",
              "currency": "USD"
            }
          }
        }
      },
      "tax": {
        "type": "Entry::Tax",
        "start": 3988,
        "end": 4023,
        "fields": {
          "rate": {
            "type": "Percent",
            "start": 4015,
            "end": 4023,
            "fields": {
              "number": {
                "type": "Number",
                "start": 4015,
                "end": 4021,
                "text": "19.600"
              }
            },
            "value": "19.600"
          }
        },
        "value": "19.600"
      },
      "pickUp": {
        "type": "Entry::Stop::PickUp",
        "start": 4199,
        "end": 4342,
        "fields": {
          "location": {
            "type": "Location",
            "start": 4226,
            "end": 4244,
            "fields": {
              "name": {
                "type": "Name",
                "start": 4226,
                "end": 4238,
                "text": "Nice Airport"
              },
              "code": {
                "type": "Code",
                "start": 4241,
                "end": 4244,
                "text": "NCE"
              }
            },
            "value": {
              "name": "Nice Airport",
              "code": "NCE"
            }
          },
          "date": {
            "type": "Date",
            "start": 4272,
            "end": 4299,
            "fields": {
              "month": {
                "type": "Month::September",
                "start": 4281,
                "end": 4290,
                "text": "September",
                "value": "09"
              },
              "day": {
                "type": "Day",
                "start": 4291,
                "end": 4293,
                "text": "21"
              },
              "year": {
                "type": "Year",
                "start": 4295,
                "end": 4299,
                "text": "2000"
              }
            },
            "value": "2000-09-21"
          },
          "time": {
            "type": "Time",
            "start": 4327,
            "end": 4342,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 4337,
                "end": 4339,
                "text": "12"
              },
              "minute": {
                "type": "Minute",
                "start": 4339,
                "end": 4341,
                "text": "00"
              }
            },
            "value": "12:00"
          }
        }
      },
      "return": {
        "type": "Entry::Stop::Return",
        "start": 4344,
        "end": 4486,
        "fields": {
          "location": {
            "type": "Location",
            "start": 4371,
            "end": 4389,
            "fields": {
              "name": {
                "type": "Name",
                "start": 4371,
                "end": 4383,
                "text": "Nice Airport"
              },
              "code": {
                "type": "Code",
                "start": 4386,
                "end": 4389,
                "text": "NCE"
              }
            },
            "value": {
              "name": "Nice Airport",
              "code": "NCE"
            }
          },
          "date": {
            "type": "Date",
            "start": 4417,
            "end": 4443,
            "fields": {
              "month": {
                "type": "Month::September",
                "start": 4425,
                "end": 4434,
                "text": "September",
                "value": "09"
              },
              "day": {
                "type": "Day",
                "start": 4435,
                "end": 4437,
                "text": "26"
              },
              "year": {
                "type": "Year",
                "start": 4439,
                "end": 4443,
                "text": "2000"
              }
            },
            "value": "2000-09-26"
          },
          "time": {
            "type": "Time",
            "start": 4471,
            "end": 4486,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 4481,
                "end": 4483,
                "text": "12"
              },
              "minute": {
                "type": "Minute",
                "start": 4483,
                "end": 4485,
                "text": "00"
              }
            },
            "value": "12:00"
          }
        }
      },
      "carGroup": {
        "type": "Entry::CarGroup",
        "start": 4488,
        "end": 4562,
        "fields": {
          "group": {
            "type": "Text",
            "start": 4515,
            "end": 4562,
            "text": "Group I - Renault Megane Convertible or similar"
          }
        },
        "value": "Group I - Renault Megane Convertible or similar"
      },
      "renter": {
        "type": "Entry::Renter",
        "start": 4564,
        "end": 4601,
        "fields": {
          "name": {
            "type": "Name",
            "start": 4591,
            "end": 4601,
            "text": "DANA WELLS"
          }
        },
        "value": "DANA WELLS"
      },
      "discount": {
        "type": "Entry::Discount",
        "start": 4602,
        "end": 4636,
        "fields": {
          "number": {
            "type": "Code",
            "start": 4629,
            "end": 4636,
            "text": "L602318"
          }
        },
        "value": "L602318"
      },
      "frequentFlyer": {
        "type": "Entry::FrequentFlyer",
        "start": 4637,
        "end": 4673,
        "fields": {
          "number": {
            "type": "Code",
            "start": 4665,
            "end": 4673,
            "text": "QM820614"
          }
        }
      }
    }
  },
  {
    "type": "Reservation",
    "start": 6594,
    "end": 7599,
    "fields": {
      "number": {
        "type": "Entry::ReservationNumber",
        "start": 6594,
        "end": 6632,
        "fields": {
          "number": {
            "type": "Code",
            "start": 6621,
            "end": 6632,
            "text": "30134505US2"
          }
        },
        "value": "30134505US2"
      },
      "rate": {
        "type": "Entry::Rate",
        "start": 6634,
        "end": 6702,
        "fields": {
          "days": {
            "type": "Days",
            "start": 6653,
            "end": 6654,
            "text": "2"
          },
          "rate": {
            "type": "Money",
            "start": 6691,
            "end": 6702,
            "fields": {
              "amount": {
                "type": "Amount",
                "start": 6691,
                "end": 6696,
                "fields": {
                  "groups": [
                    {
                      "type": "Group",
                      "start": 6691,
                      "end": 6693,
                      "text": "59"
                    }
                  ],
                  "fraction": {
                    "type": "Fraction",
                    "start": 6694,
                    "end": 6696,
                    "text": "82"
                  }
                },
                "value": "59.82"
              },
              "currency": {
                "type": "Currency",
                "start": 6699,
                "end": 6702,
                "text": "USD"
              }
            },
            "value": {
              "amount": "59.82",
              "currency": "USD"
            }
          }
        }
      },
      "surcharges": {
        "type": "Entry::Surcharges",
        "start": 6763,
        "end": 6862,
        "fields": {
          "fees": [
            {
              "type": "Fee::Charge",
              "start": 6790,
              "end": 6827,
              "fields": {
                "name": {
                  "type": "Name",
                  "start": 6805,
                  "end": 6826,
                  "text": "Customer Contract Fee"
                },
                "amount": {
                  "type": "Money",
                  "start": 6790,
                  "end": 6795,
                  "fields": {
                    "amount": {
                      "type": "Amount",
                      "start": 6791,
                      "end": 6795,
                      "fields": {
                        "groups": [
                          {
                            "type": "Group",
                            "start": 6791,
                            "end": 6792,
                            "text": "0"
                          }
                        ],
                        "fraction": {
                          "type": "Fraction",
                          "start": 6793,
                          "end": 6795,
                          "text": "75"
                        }
                      },
                      "value": "0.75"
                    },
                    "currency": {
                      "type": "Currency",
                      "start": 6790,
                      "end": 6791,
                      "text": "$"
                    }
                  },
                  "value": {
                    "amount": "0.75",
                    "currency": "$"
                  }
                },
                "per": {
                  "type": "Unit::Day",
                  "start": 6800,
                  "end": 6803,
                  "text": "day",
                  "value": "day"
                }
              }
            },
            {
              "type": "Fee::Share",
              "start": 6830,
              "end": 6862,
              "fields": {
                "name": {
                  "type": "Name",
                  "start": 6838,
                  "end": 6861,
                  "text": "Concession Recovery Fee"
                },
                "percent": {
                  "type": "Percent",
                  "start": 6830,
                  "end": 6836,
                  "fields": {
                    "number": {
                      "type": "Number",
                      "start": 6830,
                      "end": 6835,
                      "text": "11.11"
                    }
                  },
                  "value": "11.11"
                }
              }
            }
          ]
        }
      },
      "tax": {
        "type": "Entry::Tax",
        "start": 6863,
        "end": 6897,
        "fields": {
          "rate": {
            "type": "Percent",
            "start": 6890,
            "end": 6897,
            "fields": {
              "number": {
                "type": "Number",
                "start": 6890,
                "end": 6895,
                "text": "6.000"
              }
            },
            "value": "6.000"
          }
        },
        "value": "6.000"
      },
      "total": {
        "type": "Entry::Total",
        "start": 6898,
        "end": 6936,
        "fields": {
          "total": {
            "type": "Money",
            "start": 6925,
            "end": 6936,
            "fields": {
              "amount": {
                "type": "Amount",
                "start": 6925,
                "end": 6930,
                "fields": {
                  "groups": [
                    {
                      "type": "Group",
                      "start": 6925,
                      "end": 6927,
                      "text": "72"
                    }
                  ],
                  "fraction": {
                    "type": "Fraction",
                    "start": 6928,
                    "end": 6930,
                    "text": "05"
                  }
                },
                "value": "72.05"
              },
              "currency": {
                "type": "Currency",
                "start": 6933,
                "end": 6936,
                "text": "USD"
              }
            },
            "value": {
              "amount": "72.05",
              "currency": "USD"
            }
          }
        },
        "value": {
          "amount": "72.05",
          "currency": "USD"
        }
      },
      "pickUp": {
        "type": "Entry::Stop::PickUp",
        "start": 7112,
        "end": 7256,
        "fields": {
          "location": {
            "type": "Location",
            "start": 7139,
            "end": 7164,
            "fields": {
              "name": {
                "type": "Name",
                "start": 7139,
                "end": 7158,
                "text": "Newark Intl Airport"
              },
              "code": {
                "type": "Code",
                "start": 7161,
                "end": 7164,
                "text": "EWR"
              }
            },
            "value": {
              "name": "Newark Intl Airport",
              "code": "EWR"
            }
          },
          "date": {
            "type": "Date",
            "start": 7192,
            "end": 7214,
            "fields": {
              "month": {
                "type": "Month::August",
                "start": 7199,
                "end": 7205,
                "text": "August",
                "value": "08"
              },
              "day": {
                "type": "Day",
                "start": 7206,
                "end": 7208,
                "text": "03"
              },
              "year": {
                "type": "Year",
                "start": 7210,
                "end": 7214,
                "text": "2001"
              }
            },
            "value": "2001-08-03"
          },
          "time": {
            "type": "Time",
            "start": 7242,
            "end": 7256,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 7251,
                "end": 7253,
                "text": "16"
              },
              "minute": {
                "type": "Minute",
                "start": 7253,
                "end": 7255,
                "text": "00"
              }
            },
            "value": "16:00"
          }
        }
      },
      "return": {
        "type": "Entry::Stop::Return",
        "start": 7258,
        "end": 7402,
        "fields": {
          "location": {
            "type": "Location",
            "start": 7285,
            "end": 7310,
            "fields": {
              "name": {
                "type": "Name",
                "start": 7285,
                "end": 7304,
                "text": "Newark Intl Airport"
              },
              "code": {
                "type": "Code",
                "start": 7307,
                "end": 7310,
                "text": "EWR"
              }
            },
            "value": {
              "name": "Newark Intl Airport",
              "code": "EWR"
            }
          },
          "date": {
            "type": "Date",
            "start": 7338,
            "end": 7360,
            "fields": {
              "month": {
                "type": "Month::August",
                "start": 7345,
                "end": 7351,
                "text": "August",
                "value": "08"
              },
              "day": {
                "type": "Day",
                "start": 7352,
                "end": 7354,
                "text": "05"
              },
              "year": {
                "type": "Year",
                "start": 7356,
                "end": 7360,
                "text": "2001"
              }
            },
            "value": "2001-08-05"
          },
          "time": {
            "type": "Time",
            "start": 7388,
            "end": 7402,
            "fields": {
              "hour": {
                "type": "Hour",
                "start": 7397,
                "end": 7399,
                "text": "16"
              },
              "minute": {
                "type": "Minute",
                "start": 7399,
                "end": 7401,
                "text": "00"
              }
            },
            "value": "16:00"
          }
        }
      },
      "carGroup": {
        "type": "Entry::CarGroup",
        "start": 7404,
        "end": 7468,
        "fields": {
          "group": {
            "type": "Text",
            "start": 7431,
            "end": 7468,
            "text": "Group C - Pontiac Grand Am or similar"
          }
        },
        "value": "Group C - Pontiac Grand Am or similar"
      },
      "renter": {
        "type": "Entry::Renter",
        "start": 7470,
        "end": 7507,
        "fields": {
          "name": {
            "type": "Name",
            "start": 7497,
            "end": 7507,
            "text": "DANA WELLS"
          }
        },
        "value": "DANA WELLS"
      },
      "discount": {
        "type": "Entry::Discount",
        "start": 7508,
        "end": 7542,
        "fields": {
          "number": {
            "type": "Code",
            "start": 7535,
            "end": 7542,
            "text": "L602318"
          }
        },
        "value": "L602318"
      },
      "frequentFlyer": {
        "type": "Entry::FrequentFlyer",
        "start": 7543,
        "end": 7599,
        "fields": {
          "program": {
            "type": "Program",
            "start": 7570,
            "end": 7590,
            "text": "CONTINENTAL AIRLINES"
          },
          "number": {
            "type": "Code",
            "start": 7591,
            "end": 7599,
            "text": "QM820614"
          }
        }
      }
    }
  }
]

About this spec

Car-rental reservation confirmations sent as plain-text email: for each reservation its number, rental period and rate, surcharges, tax, approximate total, pick-up and return location, date and time, car group and the renter's name, discount and frequent-flyer numbers.

Package files

  • business-messages.yml
  • samples/other.txt
  • samples/variants.txt
  • tests/business-messages.test.yml
  • tests/expected/other.yaml
  • tests/expected/sample.yaml
  • tests/expected/variants.yaml
  • texomy.json

166 nodes from 3 top-level matches.

Run it yourself

Save the example from Studio to a folder, then in that folder:

texomy parse input.txt -m business-messages
texomy test

Write the spec once. Run it on everything.

Install the CLI, connect your agent, and turn your first sample into typed data in minutes.

brew install texomy/tap/texomy