> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/workflow-builder/apps/regex.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
