Regex
What It Does
Performs regular expression search and replace operations on text. It finds patterns in your input string and replaces them according to your specified replacement pattern.
Inputs
input
The text to process
String
Yes
match
The regular expression pattern to find
String
No
flags
Regex flags (like "g" for global, "i" for case-insensitive)
String
No
replace
The replacement pattern
String
No
Outputs
value
The text after pattern replacement
String

How to Use It
Drag the Regex node into your graph.
Connect the text you want to process to the "input" input. For e.g.,
color.red.100
.Set the "match" value to the regular expression pattern you want to find (without the slashes). For e.g.,
Color
.Set any "flags" you need for the regex operation (e.g., "i" to make it case insensitive).
Define the "replace" pattern to substitute for matched text (e.g.,
brand
).The output will be a string
brand.red.100
, wherecolor
is replaced withbrand
.

Tips
Don't include the slash delimiters in your match pattern - just the pattern itself.
Use the "g" flag to replace all occurrences rather than just the first match.
Regex flags:
i
: Ignore case, case-insensitive matching.m
: Multi-line, multi-line matching.s
: Dotall, dot matches any char including newline.a
: ASCII, ASCII-only matching.x
: Verbose, ignore whitespace and comments.
You can combine these flags in any order. For example:
i
- Case insensitive matchingim
- Case insensitive and multiline matchingis
- Case insensitive and dot matches newlineimsx
- Multiple flags combined
See Also
Replace: For simple string replacement without regular expressions.
Normalize: For standardizing text representation.
Use Cases
Text Cleanup: Remove or replace unwanted patterns or characters in text.
Format Conversion: Transform text patterns from one format to another.
Data Extraction: Isolate specific patterns from larger text blocks for token creation.
Last updated