Skip to main content
Logic

Regex Operation

logic_regex
Aliases:regex

Perform regular expression matches (Contains) or text substitutions (Find and Replace) directly on workflow context.

Inputs1
Outputs1
Settings5
Field AccessState Key
Examples2

About this Node

Applies a deterministic regular expression operation (`replace`, `contains`, `extract_first`, `extract_all`, or `split`) to a string read from workflow state at `input_key` and stores the result under `output_key`. Ideal for parsing IDs, scrubbing PII, normalizing strings, or splitting text into arrays for Parallel Fan-out.

Ports & Branches

Inputs (1)
inPort 0Inbound execution flow
Outputs (1)
outPort 1Outbound execution flow with regex output

How this Node Reads Data

Input Access Field Example Description
Source State Key State Key input_key raw_email_body Reads the string value stored under `input_key` in the node's incoming state.

State Keys Written (Outputs)

Key Pattern Type Role Description
{output_key} string | boolean | array<string> Primary Substituted string (`replace`), boolean check (`contains`), first match/groups (`extract_first`), all matches (`extract_all`), or array of parts (`split`).

Tips & Best Practices

  • Alias `regex` resolves to `logic_regex` in authoring specs and `/docs?node=regex`.
  • Runs deterministically in-process with zero container spin-up overhead—prefer Regex over Python Script for simple string extraction.

Commonly Paired With