Replace Substring V2
Replaces text matching a pattern, with the added ability to replace matches with an empty string. Use it when you also need to strip text out entirely.
What it does
- Finds matches of a string or regular-expression pattern in the original text.
- Replaces them with the replacement value, or removes them entirely.
- Returns the resulting text.
Inputs
| Name | Type | Description |
|---|---|---|
| Original Text | String | Original text |
| Pattern | String | String or regex to match |
| Replacement | String | String to replace pattern by. Use DG_REPLACE_BY_EMPTY to replace by the empty string. |
| Case Sensitive | Boolean | Whether the match is case sensitive |
| Replace Globally | Boolean | Whether to replace all matched values |
Outputs
| Name | Type | Description |
|---|---|---|
| Success | Boolean | Whether the replacement was successful |
| Result Value | String | Result value of the replacement |
Notes
- Set the replacement to
DG_REPLACE_BY_EMPTYto delete the matched text. - Turn on Replace Globally to replace every match rather than only the first.