The Replace Text action is used to find and replace a porting of text within a larger body of text and populate a variable with the resulting text. The variable must be created in an earlier step using the Create Variable action. The text searched and replaced can be one or more words, phrases, or sentences, or it can be a regular expression.
From the Task Builder Available Actions pane, open the Text folder and double-click the Replace Text action or drag it into the Steps pane.
In the Text box, enter the target text to be searched. To enter a variable or dataset, click the Insert Expression/Variable button and use the Expression Builder to insert it.
In the Find box, enter the text to look for within the target text.
In the Replace with box, enter the text to replace the found text.
To make the search case sensitive, select Case Sensitive.
If the text to look for is an expression, select Regular Expression.
In the Populate variable with result box, select the variable to be populated with the resulting text.
Click the Advanced tab.
To begin the replacements from a point beyond the first instance, enter the number to begin in the Starting at the following instance box.
If you want to limit the maximum number of replacements, enter the number in the Maximum replacements box.
If you want to populate a variable with the number of replacements, select the variable in the Total replacement count into variable box.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Replace Text Action