---
title: "Get Subtext Using Regex Step"
url: "https://docs.robotiq.ai/en/article/get-subtext-using-regex-step"
language: "en"
last_updated: "2025-12-24T14:38:08.895Z"
---

# Get Subtext Using Regex Step

The Get Subtext Using Regex step pulls out specific text from a larger text string. It uses regular expressions (regex) to find and grab matching subtexts. Use this step when you need to find patterns in text, like email addresses, phone numbers, or specific codes.

## How to Use Get Subtext Using Regex

This step finds all times a pattern shows up in your text and puts them in a list.

1.  **Add the Step:** Drag and drop the "Get Subtext Using Regex" step into your process.
2.  **Set Up Parameters:** Fill in the necessary input and output parameters.

## Parameters Explained

**Step Name** (Optional)

-   A custom name for this process step.
-   Example: `Extract Emails`

**Text** (Required)

-   The text string where you want to look for subtexts.
-   Example: `My contact is user@example.com.`

**Regex expression** (Required)

-   The regular expression pattern to search for in your text.
-   Example: `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` (This regex finds email addresses.)

**Destination string array variable** (Required)

-   A new or existing string array variable to hold all subtexts the regex finds.
-   Example: `foundEmails`
-   If the regex finds more than one match, each match becomes an item in this array.

**Element count destination variable** (Required)

-   A new or existing integer variable to hold the total number of subtexts found.
-   Example: `emailCount`

## Related Articles

-   [Get Subtext Step - Robotiq.ai Help Center](https://docs.robotiq.ai/en/article/get-subtext-step)
-   [Split Text Step - Robotiq.ai Help Center](https://docs.robotiq.ai/en/article/split-text-step)
-   [Parse Text Step - Robotiq.ai Help Center](https://docs.robotiq.ai/en/article/parse-text-step)

## Need Help?

Can't find what you're looking for? Join the [Robotiq Community](https://community.robotiq.ai/home/) to get help from other users and the Robotiq team.

![](https://cdn-assets.productfruits.com/a927a680-013a-4b66-a5c7-336a7687355d)
