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
- Create a String variable and name it input. For the Default value, write "RPA".
- Add a Write Line activity inside the initial Sequence.
- In the Write Line Text field, write input. This is to simply display the initial value of the variable.
- Under the Write Line Activity, add a Replace activity.
- In the Replace Input field, add the input variable.
- In the Replace Pattern field, write "RPA".
- In the Replace Replace With field, write "Robotic Process Automation". This means to replace the Pattern with this value.
- In the Replace Result field under Attributes, add the input variable.
- Under the Replace activity, add your second Write Line activity.
- 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: