Node demonstrating how to work with regex.
This example node demonstrates how to work with regular expressions (regex). For more information about how to write regex, see Regular expression syntax.
Specify a Pattern to be matched in the source Text.
Set the mode to be either Search or Replace. When in Search mode, the first match will be returned if it can be found anywhere in the text. In case of no match, the node will return an empty string.
When in ‘Replace’ mode, all matches will be replaced by the Replacement string. There will be no replacement in case of no match, and the node will return the original text.
- output text
- Mode (mode)
Search for the first match of the pattern anywhere in the string, or replace at all matches by replacement.
- Pattern (pattern)
- Replacement (repl)
- Text (src_text)
Source text to be matched by pattern.