Replacement
Replace a text with another text.
Overview
This operation lets you replace occurrences of a specific text with a new text. For instance, consider the following sentence:
The dog jumped over the curb and then the dog sprinted away.
Using this operation, you can replace all instances of dog with cat, resulting in:
The cat jumped over the curb and then the cat sprinted away.
Syntax
This operation supports both of the following syntaxes:
Option 1
Option 2
Note: Specifying the replacement strategy is optional. By default, all occurrences are replaced.
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
the text
Yes
the replacement strategy
No
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
input
The input text where replacements will occur.
The dog jumped over the curb and then the dog sprinted away.
Yes
substring
The section of the text to be replaced.
dog
Yes
replacement
The replacement value.
cat
Yes
strategy
The method for replacing matches of the substring. Accepted values:
first- Removes the first occurrence. (default)
last - Removes the last occurrence.
all - Removes all occurrences.
all
Optional
Examples
1. Replace all occurrences
2. Replace the first occurrence
Last updated
Was this helpful?