Text Replace icon

Text Replace

Find and replace text with support for regex, multiple replacements, and batch processing

Regex Replace

AI-generated

Summary

Replace text using a regex pattern and return the modified record(s).

Inputs

  • inputSource — How to select the text to process (field, allFields, or custom text).
  • fieldName (required) — Name of the field containing the text when inputSource is 'field'.
  • customText (required) — Direct text or expression to process when inputSource is 'custom'.
  • outputFieldName (required) — Name of the field where the replacement result will be stored.
  • regexPattern (required) — Regular expression pattern (without delimiters) to match.
  • regexReplace — Replacement string; use $1, $2 for capture groups.
  • regexFlags — Regex flags such as 'g' (global), 'i' (case‑insensitive), etc.
  • options — Additional settings like case sensitivity, replace all, nested fields, etc.

Output shape

A list of items, one per input record, each containing the modified JSON payload.

If continueOnFail is enabled, items may include an 'error' field; otherwise the operation throws on failure.

Examples

Example 1: Replace a phone number pattern in a 'phone' field and store result in 'cleanPhone'.

inputSource=field, fieldName=phone, regexPattern=\d{3}-\d{4}, regexReplace=XXX-$2, regexFlags=g, outputFieldName=cleanPhone

Example 2: Replace all string fields in the payload with uppercase version of themselves.

inputSource=allFields, regexPattern=, regexReplace=, regexFlags=g, options={"caseSensitive":true,"replaceAll":true}

Links

Discussion