PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

RegEx Validate

Checks whether a text matches a regular expression, and returns true or false.

RegEx Validate checks a text against a regular expression (RegEx) and returns true or false. Use it to validate a format before you continue: an invoice number, a postal code, an email address, an IBAN.

Add the action

In the Process Designer toolbox, open String, then RegEx, and pick RegEx Validate (or type RegEx Validate in the search box). In the step's properties, click RegEx pattern to open the panel with the fields below.

The RegEx Validate action properties with the RegEx pattern button

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Value to validateInputTextYesThe text to check.
RegEx expressionInputTextYesThe regular expression, written without delimiters (no /.../).
Ignore caseInputBoolean (true/false)NoTicked by default: uppercase and lowercase letters are treated as equal. Untick it for a case-sensitive check, or when your expression uses lookarounds or backreferences (see below).
Validation resultOutputBoolean (true/false)Yestrue if the expression matches the text, otherwise false.

Example

Value to validateRegEx expressionIgnore caseValidation result
INV-2024-0042^INV-\d{4}-\d{4}$offtrue
inv-2024-0042^INV-\d{4}-\d{4}$offfalse
inv-2024-0042^INV-\d{4}-\d{4}$ontrue
ref INV-2024-0042 endINV-\d{4}offtrue
ana.pop@example.com^[\w.+-]+@[\w-]+(\.[\w-]+)+$ontrue
abc1^(?=.*\d)[a-z0-9]+$offtrue
abc1^(?=.*\d)[a-z0-9]+$onthe step fails

Good to know

  • The expression only has to match part of the text. INV-\d{4} is found inside ref INV-2024-0042 end. To check the whole value, start the expression with ^ and end it with $.
  • The RegEx syntax is the .NET flavour: \d, \w, \s, {n,m}, named groups (?<name>...) and inline options such as (?m) all work.
  • With Ignore case ticked, lookarounds and backreferences are not supported. Expressions with (?=...), (?!...), (?<=...), (?<!...) or \1 fail the step with a message that starts with "RegexOptions.NonBacktracking is not supported in conjunction with expressions containingโ€ฆ". Untick Ignore case for these expressions, and use character classes such as [A-Za-z] if you still need both cases.
  • An empty value always gives false, even for an expression such as ^$.
  • An invalid expression fails the step, for example "Invalid pattern '([a-z' at offset 5. Unterminated [] set."

On this page