Replace component
The Replace component is used to find and replace text in a message body.
Configuration
The Replace component has the following configuration options:
Property | Description |
---|---|
Regex | To match all the text that needs to be replaced. |
Multiline flag | Find an replace text on multiple lines. |
Ignore case flag | Find and replace text while ignoring case of text. |
ReplaceWith | To replace the found text with. |
Group | Shows up after you filled in a regex and clicked the 'Retrieve Groups & Verify Regex' button. It has a default of all. If the regex has one or more groups you can select which group you want to use to find and replace text. |
Regex groups
For more information on groups in regex, please visit the following link: Regex groups
Behaviour
After filling in a regex you can click the 'Retrieve Groups & Verify Regex' button to verify it and retrieve the regex groups. The Group configuration option has a default of 'All'. If the regex has one or more groups you can select which group you want to use to find and replace text or you can leave it on the default the find and replace text for all groups. The button also validates your regex and a message above the button will tell you if it is valid or not.
Remarks
Exceptionally, the characters \n
(line feed), \r
(carriage return) and \t
(tab) will be unescaped, allowing these to be introduced in the replaced text.
For example, you're able to replace semi-colons with tabs or create a new line whenever the Regex
is matched.