Skip to main content

$replaceAll

The $replaceAll operator replaces all occurrences of a substring with a new substring in the original string.

Input

  • An array containing exactly three string values: the original string, the substring to replace, and the new substring

Output

  • The original string with all occurrences of the specified substring replaced

Examples

Basic Replace All

Result: "Hi, world! Hi, universe!"

Field Value

Result: The text field with all occurrences of “old_word” replaced with “new_word”