Description

Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.



Attributes

Input

  • Input - The string to be replaced.

  • Pattern - The regular expression pattern to match.

  • Regex Option - A list of specific options for matching.

  • Replacement - The replacement string.

Common

  • ContinueOnError - The Boolean value to specify whether to continue executing the next activities even if there is an error thrown on this activity.

Misc

  • DisplayName - Renames the activity.

  • Result - The resulting string once the characters have been removed.


Example

  1. Create a String variable and name it input. For the Default value, write "RPA".
  2. Add a Write Line activity inside the initial Sequence.
  3. In the Write Line Text field, write input. This is to simply display the initial value of the variable.
  4. Under the Write Line Activity, add a Replace activity.
  5. In the Replace Input field, add the input variable.
  6. In the Replace Pattern field, write "RPA".
  7. In the Replace Replace With field, write "Robotic Process Automation". This means to replace the Pattern with this value.
  8. In the Replace Result field under Attributes, add the input variable.
  9. Under the Replace activity, add your second Write Line activity.
  10. In the Write Line Text field, add the input variable. This is to display the new value of the variable. 

    The use case should look as the following screenshot:



This should be the output in the Output panel: