Remove Text Using Substrings
Removes a specific piece of text from a larger text.
Overview
This operation allows you to edit a text by specifying a piece of text ("a substring") to remove. You can optionally define the strategy to remove the substring's first, last, or all occurrences in the larger text.
Syntax
Optional: Specifying a Remove Strategy
Optionally, you can specify a remove strategy using the where keyword. This specifies which occurrences of the second text to remove:
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
the text1
Yes
the text2
Yes
the remove 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.
text1 value
The target text.
"The dog barked."
Yes
text2 value
The text to be removed from the target string.
"dog"
Yes
strategy
The removal strategy. There is no default. Accepted values:
first - Removes the first occurrence.
last - Removes the last occurrence.
all - Removes all occurrences.
"all"
Optional
Examples
1. Remove all occurrences
2. Remove the first occurrence
3. Remove the last occurrence
4. No removal strategy specified
This will Raise a Question and prompt you to choose which value to remove.
Multiple: "dog"s in: "The quick brown fox jumps over the lazy dog. The dog barked." Which one do you want to remove?
Last updated
Was this helpful?