The Regex Replace block for Nodestly workflows replaces text using a regex rule.
Use it when
Replace the first or all bounded safe-regex matches with controlled capture substitutions.
Inputs and outputs
- Text —
text, required. - Pattern —
text, required. - Replacement —
text, required. - Text — output
text. - Replacement count — output
number.
Controls
- Case mode — default
sensitive; choices:sensitive,insensitive. - Line mode — default
single; choices:single,multiline. - Scope — default
all; choices:first,all.
Rules
All mode rejects patterns that can match empty text, permits exactly 1,000 replacements, and stops above 1,000. The shared safe grammar permits repeated exact counted atoms but at most one variable-width atom quantifier in the whole pattern. Replacement supports literal text, $$, $&, $1-$32, and $<name>; whole-prefix and whole-suffix substitutions are rejected. Replacement is at most 4,096 characters and output at most 262,144.
Example
Pattern (\d+), replacement [$1], and All turns every numeric run into bracketed text.
Failure behavior
Missing inputs, wrong connector values, unsafe records, unsupported values, cycles, unsupported modes, and size-limit violations stop the workflow and mark this block. Correct the highlighted connector or setting, then run again. Inputs are never changed.
Exact settings reference
These are the saved settings and defaults. If a value is connected to the matching input, that connected value is used.
| ID | Setting | Control | Default | Bounds/options |
|---|---|---|---|---|
caseMode | Case mode | toggle | sensitive | options: Sensitive (sensitive), Insensitive (insensitive) |
lineMode | Line mode | toggle | single | options: Single line (single), Multiline (multiline) |
scope | Scope | toggle | all | options: First (first), All (all) |
Errors and recovery
When this block reports an error, no downstream output is emitted. Correct the highlighted input or setting described by the message, then run the workflow again.
Connector data types
The type below is the data type that actually travels through the connection. Any additional validation is described separately in this block guide.
| Direction | Connector | Type | Required |
|---|---|---|---|
| Input | text — Text | text | yes |
| Input | pattern — Pattern | text | yes |
| Input | replacement — Replacement | text | yes |
| Output | result — Text | text | on success |
| Output | replacements — Replacement count | number | on success |
