Skip to content

Regular Expression Evaluator#

The Regular Expression Evaluator applies Regular Expressions (RegEx) to input data for pattern matching, extraction, replacement, or validation purposes. It is useful for tasks such as parsing structured text, extracting specific data points, or transforming text using substitution patterns.

Regular Expression Evaluator screenshot

Note

This task results from a split of the Expression Evaluator task. It can be used along with Generic Expression Evaluator and XPath Expression Evaluator.

Workflows#

Data Flow Control Flow

Inputs#

Name Data Type Description
<custom list> <custom> Defines the input values used for evaluation
Activate any Triggers task execution

The regular expressions are applied to the value received by the first input defined on the Inputs tab. Additional inputs can be defined, but their values are not used in the evaluation.

Outputs#

Name Data Type Description
<custom list> <custom> Defines the output values generated by the expression
Success Boolean Returns true if the task completes successfully
Error Error Contains information about any error that occurs

Settings#

The General tab includes standard task settings and the following parameters:

Name Data Type Values Default Value Description
Evaluator Behavior enum EvaluateAll
EvaluateUntilTrue
EvaluateAll Defines whether all expressions are evaluated or evaluation stops after the first true result
Clear Inputs Boolean false When enabled, clears input values after the task is executed

Regular Expression Evaluator General Settings screenshot

The Inputs Tab includes the following settings:

Name Data Type Description
Name String Input Name
Friendly Name String The displayed input name
Type Long
Decimal
DateTime
Boolean
String
Integer
Defines the data type of the input
Default Value any Default value assigned to the input parameter
Required Boolean Indicates if the input is required

Regular Expression Evaluator Input Settings screenshot

The Outputs Tab includes the following settings:

Name Data Type Description
Name String Output Name
Friendly Name String The displayed output name
Type Long
Decimal
DateTime
Boolean
String
Integer
Defines the data type of the output
Expression any Regular expression applied to the input value

Regular Expression Evaluator Output Settings screenshot

Behavior#

The task runs when the Activate input is triggered and every input defined on the Inputs tab has a value: required inputs must receive one, and optional inputs can fall back to their default value. The expression of each output is then applied to the value of the first configured input:

  • When the expression does not match, the output does not emit.
  • When the expression matches and has no capture groups, the output emits the whole matched text.
  • When the expression matches and has capture groups, the output emits the values of all capture groups concatenated into a single string.

The result is converted to the Type configured for the output. A result converts to Boolean true when it is True, t, yes, y, or 1, and to false otherwise.

The Evaluator Behavior setting defines how the configured output expressions are processed:

  • EvaluateAll (default): Evaluates every configured expression and emits each result on its output.
  • EvaluateUntilTrue: Evaluates the expressions in the configured order and stops at the first expression whose result converts to true, emitting only that output.

When the Clear Inputs setting is enabled, the received input values are cleared when the task executes, so the next execution requires new values instead of reusing the previous ones.

Examples#

Extract a value with a capture group#

Configure the Inputs tab with one input:

Name Type Required
containerName String Yes

Configure the Outputs tab with:

Name Type Expression
waferNumber String ^Wafer_(\d*)_Container$

When the containerName input receives Wafer_01_Container, the expression matches and the capture group holds 01, so the waferNumber output emits 01. With the output Type set to Integer instead, the same match converts to 1.

Validate a value with a full match#

An expression without capture groups emits the whole matched text, which suits validation scenarios:

Name Type Expression
isWord String ^\w*$

When the input receives ThisIsAWord, the isWord output emits ThisIsAWord. When the input contains spaces or other characters that break the match, the output does not emit.

Classify with EvaluateUntilTrue#

Set the Evaluator Behavior setting on the General tab to EvaluateUntilTrue and configure the Outputs tab with:

Name Type Expression
isReady Boolean READY=(1\|yes\|y)
isDown Boolean DOWN=(1\|yes\|y)

When the input receives READY=1, the first expression captures 1, which converts to Boolean true, so the isReady output emits true and the evaluation stops. The isDown expression is never evaluated and its output does not emit.