For the complete documentation index, see llms.txt. This page is also available as Markdown.

Regex

The Regex Node in your workflow uses the Regex Extract action. This tool allows you to extract specific patterns or information from a block of text using regular expressions (regex).

Available Actions

Regex Extract

  • Purpose: Extracts content from text using a regular expression pattern you provide.

  • Provider: Regex

Inputs Required

  1. Content (string, required)

    • The text you want to extract information from.

    • Example: "Order number: 12345, Date: 2025-07-10"

  2. Expression (string, required)

    • The regular expression pattern to search for in the content.

    • Example: "Order number: (\d+)"

Output

  • Result (string)

    • The extracted value(s) from the content that match your regex pattern.

How to Use the Regex Node

  1. Connect the node: Pass the text you want to analyze (from an LLM, input, or another node) into the Regex node.

  2. Configure the action:

    • Set the "Content" field to the text you want to search.

    • Set the "Expression" field to your desired regex pattern.

  3. Use the output: The result will be available as {action-X.result} (where X is the node number) for downstream nodes.

Example Usage

Suppose you want to extract an order number from a message:

  • Content: "Order number: 12345, Date: 2025-07-10"

  • Expression: "Order number: (\d+)"

  • Result: "12345"

You can reference this result in other nodes using {action-3.result} if your Regex node is action-3.

Last updated

Was this helpful?