Replace Values
Find-and-replace within selected columns. Each rule targets one or more columns and runs in
exact,contains, orregexmode, optionally case-insensitive. Multiple rules are applied in order. Use it to normalize variant spellings (USA/U.S.A./United States→US), strip prefixes, mask values, or apply regex-based rewrites.
How it works
Section titled “How it works”Replace Values is a streaming transform: each row is processed independently. For every configured rule, the targeted columns on that row are converted to a string and run through the rule’s matcher.
Match modes differ in how they treat the find value:
exactreplaces the cell only when the entire string equalsfind.containsreplaces every occurrence of the literal substringfindinside the cell. Special regex characters infindare escaped automatically.regextreatsfindas a JavaScript regular expression and replaces every match. Thegflag is always set;iis added whencaseInsensitiveis true. Capture groups are available via$1,$2, … in the replacement.
Cell values are coerced to a string via the standard cell-to-string rule (numbers and booleans become their string forms; objects are JSON-stringified) before matching, and the replaced value is always written back as a string.
If the rules list is empty, all rows pass through unchanged.
Input: One tabular data connection. Output: The same rows with the targeted columns rewritten according to the rules.
Options
Section titled “Options”Each rule is one find-and-replace operation. Rules are applied in array order — a downstream rule sees the output of upstream rules.
| Field | Type | Description | Default |
|---|---|---|---|
columns | string[] | Columns this rule applies to. At least one required. | (none) |
find | string | The string or regex pattern to look for. Required, non-empty. | (none) |
replace | string | The replacement value. Empty string is allowed (effectively a delete). | "" |
matchMode | "exact" | "contains" | "regex" | How find is interpreted. | "contains" |
caseInsensitive | boolean | When true, exact and contains ignore case; regex adds the i flag. | false |
Examples
Section titled “Examples”Normalize country values to ISO codes
Section titled “Normalize country values to ISO codes”A country column has variant spellings; you want them all collapsed to US.
Before:
| customer | country |
|---|---|
| Acme Corp | USA |
| Beta Inc | U.S.A. |
| Gamma LLC | United States |
| Delta Co | Canada |
Configuration: Three rules in order, all targeting country with matchMode: exact — USA → US, U.S.A. → US, United States → US.
After:
| customer | country |
|---|---|
| Acme Corp | US |
| Beta Inc | US |
| Gamma LLC | US |
| Delta Co | Canada |
Strip a prefix from order IDs (regex)
Section titled “Strip a prefix from order IDs (regex)”Order IDs come in as ORD-2026-00123; you want just the numeric tail after the last hyphen.
Before:
| order_id | amount |
|---|---|
| ORD-2026-00123 | 250 |
| ORD-2026-00124 | 450 |
| ORD-2025-99988 | 80 |
Configuration: One rule targeting order_id — find: ^ORD-\d{4}-, replace: empty string, matchMode: regex.
After:
| order_id | amount |
|---|---|
| 00123 | 250 |
| 00124 | 450 |
| 99988 | 80 |
Case-insensitive contains across multiple columns
Section titled “Case-insensitive contains across multiple columns”You want every occurrence of acme (any case) replaced with Acme Corporation in both customer and notes columns.
Before:
| customer | notes |
|---|---|
| ACME Inc | Renewal for ACME storefront |
| beta llc | acme integration in progress |
| Gamma Co | unrelated |
Configuration: One rule — columns: ["customer", "notes"], find: acme, replace: Acme Corporation, matchMode: contains, caseInsensitive: true.
After:
| customer | notes |
|---|---|
| Acme Corporation Inc | Renewal for Acme Corporation storefront |
| beta llc | Acme Corporation integration in progress |
| Gamma Co | unrelated |
Tips and Edge Cases
Section titled “Tips and Edge Cases”- Targeted cells are always written back as strings. A numeric cell that gets matched (or even just touched) by a rule becomes its string form.
42with rulefind: "4", replace: "X"becomes"X2". If a rule’sfinddoesn’t match a particular cell, the cell still passes through the matcher and is rewritten as a string. To preserve numeric types, target only the columns that genuinely need text replacement. Seeapps/web/src/transforms/replace-values/logic.ts:84-93. - Rules apply in array order; later rules see earlier rules’ output. A rule that finds
Acmeruns before a rule that findsAcme Corpwill collide. Order rules from most specific to least, or use non-overlapping patterns. containsescapes regex metacharacters;regexdoes not. Incontainsmode,find: "U.S.A."matches the literal string. Inregexmode, the samefindmatchesUthen any char thenSthen any char etc. Usecontainsunless you actually need regex semantics. Seeapps/web/src/transforms/replace-values/logic.ts:32-40.
Related Transforms
Section titled “Related Transforms”- Formula — derive new values via expression rather than literal find-and-replace.
- Change Type — convert the resulting string back to a number or boolean if downstream nodes expect typed values.
- Filter Rows — drop rows whose values match a pattern instead of rewriting them.