This is an n8n community node. It lets you use regular expressions (regex) directly in your n8n workflows for advanced text matching and extraction.
Regex is a powerful pattern matching language used for searching, parsing, and manipulating strings. This node brings flexible regex matching with support for flags, named capture groups, and multiple match results.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Compatibility
Usage
Resources
Follow the installation guide in the n8n community nodes documentation.
This node provides the following operation:
- Regex Match: Apply a regular expression to a text input, supporting capture groups, named groups, and multiple matches via flags.
- Requires n8n
v1.0.0or later. - Tested on n8n
v1.36.0. - No external credentials or services required.
- Text: The string to evaluate against the regex pattern. Can be set using an expression.
- Regex Pattern: The regular expression to apply (omit surrounding slashes
/). - Flags: Optional modifiers such as:
g(global): Find all matches.i(ignore case): Case-insensitive match.m(multiline)s(dot matches newline)u(unicode)y(sticky).
- One output item per match (if
gflag is used). - Each output item includes:
match: Full matched string.- Named groups (if used): Added as individual fields.
- Unnamed groups: Added as
group1,group2, etc.
- If the regex is invalid, the node will throw a clear error with details.
- If there are no matches, the node outputs no items.
- Each incoming item is processed independently.
Pattern: (?<first>\\w+) (?<second>\\w+)
Text: "hello world"
Output:
{
"match": "hello world",
"first": "hello",
"second": "world"
}