πŸ“— Field Mask

This article applies only to Parsio’s template-based parser.

When you create a field, Parsio remembers the context around it in order to parse similar emails or documents. By default, Parsio uses only this surrounding context and matches any value found between it.

In some cases, however, you may want to add an extra restriction on the field value itself. This is where field masks come in.

Use case

Here’s a real-world example.

A freelancer sells two types of digital products on a marketplace:

  • WordPress themes

  • WordPress plugins

The marketplace forwards all transaction emails to Parsio. These emails are almost identical, so a single template would normally match both types. However, the freelancer wants:

  • A separate template for each product type

  • A transaction type included in the exported data

Using an exact match mask

The easiest solution is to create a field called type and apply an Exact match mask.

Parsio will then:

  • Look for a specific keyword in the email (for example, plugin or theme)

  • Apply the template only if the field contains the exact specified value

This ensures that the correct template is applied to each email type.

Note: Fields with a non-default mask are marked with an orange dot on the field’s settings icon.

Available masks

Field masks are template-specific, meaning the same field can use different masks in different templates.

Parsio provides several built-in masks and also allows you to define custom masks using regular expressions.

Mask

Description

None

Match any HTML or text value

Plain text

Match text values only (no HTML tags)

Single word

Match letters, numbers, and underscores (no spaces)

Alphanumeric string

Match letters and numbers only

Email

Match a valid email address

Decimal

Match positive or negative decimals (for example, -12, 42, 0)

Exact match

Match the exact value

Custom regex

Define your own mask using a regular expression

Regular expressions

Regular expressions (regex) are patterns used to match specific text formats.

Example

Suppose you want to parse the following string: Timestamp: Monday, 15 November 2021 18:14:35

You want to extract:

  • Date β†’ 15 November 2021

  • Time β†’ 18:14:35

If you create two fields without additional constraints, Parsio may extract incorrect values due to insufficient context.

To fix this, you can apply a custom regex to the date field: [a-zA-Z0-9 ]*

How it works

  • Square brackets [] define a character class, allowing:

    • Letters

    • Numbers

    • Spaces

  • The asterisk * is a quantifier that matches the preceding character class zero or more times

This helps Parsio correctly identify the intended value.

Learn more about regex

Regular expressions are a powerful but complex topic. For further reading, check out:


Was this article helpful?
© 2026 Parsio Knowledge Base