Match Pattern

The Match Pattern node extracts text from a string using regular expressions (regex). Use it to find emails, phone numbers, URLs, or any structured pattern in unstructured text.

Type: MATCH_PATTERN Color: Green gradient (#0D5C2E#22C55E) Credits: None Test module: Yes (can skip)

Configuration

Match Pattern configuration
Match Pattern: route by matching values to patterns
FieldTypeRequiredDescription
PatternFX formula (regex)YesThe regular expression to match
TextFX formulaNoThe input text to search
Global matchBooleanNoReturn all matches (default: first match only)
Case sensitiveBooleanNoCase-sensitive matching (default: case-insensitive)
MultilineBooleanNo^ and $ match line boundaries
Single lineBooleanNo. matches newlines
Continue if no matchBooleanNoIf false, workflow stops when pattern doesn't match

Built-in templates

TemplatePatternMatches
Email[\w.-]+@[\w.-]+\.[\w]+Email addresses
Phone (US)\d{3}[-.]?\d{3}[-.]?\d{4}US phone numbers
URLhttps?://[\w.-]+\.[\w.-]+[^\s]*Web URLs
Digits only\d+Number sequences
Word characters\w+Words

Output

VariableWhat it contains
{{match_pattern.matches}}Array of matched strings
{{match_pattern.matches[0]}}First match

Example: Extract email from text

Pattern: [\w.-]+@[\w.-]+\.[\w]+ Text: {{trigger.body.message}}

If the message is "Please contact me at john@example.com for details", the output is ["john@example.com"].

Example: Extract all phone numbers

Pattern: \d{3}[-.]?\d{3}[-.]?\d{4} Global match: enabled

Returns all phone numbers found in the text.

Tip

Use the Continue if no match option when the pattern is optional, e.g., extracting a phone number that may or may not be present. Without it, the workflow stops if the pattern isn't found.