Replace Text Action—Setting Properties

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.  

To set Replace Text properties

  1. 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.

  2. 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.

  3. In the Find box, enter the text to look for within the target text.

  4. In the Replace with box, enter the text to replace the found text.

  5. To make the search case sensitive, select Case Sensitive.

  6. If the text to look for is an expression, select Regular Expression.

  7. In the Populate variable with result box, select the variable to be populated with the resulting text.

  8. Click the Advanced tab.

  9. To begin the replacements from a point beyond the first instance, enter the number to begin in the Starting at the following instance box.

  10. If you want to limit the maximum number of replacements, enter the number in the Maximum replacements box.

  11. If you want to populate a variable with the number of replacements, select the variable in the Total replacement count into variable box.

  12. To set the Description tab properties, refer to Description Tab Options.

  13. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  14. When finished, click OK to save settings and close the properties dialog window.

See Also

About Actions

Adding Task Steps

Replace Text Action