# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stackai.com/workflow-builder/apps/regex.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
