Regex icon

Regex

Regex Node

Get Matches

AI-generated

Overview

This node performs regular expression operations on input data. Specifically, for the 'Get Matches' operation, it extracts all matches of a given regex pattern from the input string data. This is useful for scenarios where you need to find and extract multiple occurrences of patterns such as email addresses, phone numbers, or any custom pattern from text data.

Use Case Examples

  1. Extract all email addresses from a block of text.
  2. Find all hashtags in social media posts.
  3. Retrieve all dates formatted in a specific way from a document.

Properties

Name Meaning
Data The input string data on which the regex operation will be performed.
Regex Pattern The regular expression pattern used to find matches in the input data.
Flags Flags to modify the regex behavior, such as 'i' for case-insensitive and 'g' for global matching.

Output

JSON

  • match - Each matched substring found by the regex pattern in the input data.

Troubleshooting

  • Ensure the regex pattern is valid; invalid patterns will cause errors.
  • If no matches are found, the output will be empty.
  • Flags should be set correctly to get expected matches, e.g., 'g' for global matching.

Links

Discussion