---
title: "Find All Occurrences In Text Step"
url: "https://docs.robotiq.ai/en/article/find-all-occurrences-in-text-step"
language: "en"
last_updated: "2025-12-24T14:19:15.746Z"
---

# Find All Occurrences In Text Step

The Find All Occurrences In Text step looks through a text string for every time a specific search term appears. It gives you a list of the starting spots (indices) where the search term is located.

Use this step when you need to find every position of a word or phrase inside a longer piece of text.

## How to Use Find All Occurrences In Text

Add this step to your process to find all matching parts within a text.

### Step 1: Set Up the Search

1.  Drag and drop the **Find All Occurrences In Text** step into your workflow.
2.  Give it a **Step name** (optional) to help you find this step in your process.
3.  Set the **Case sensitive** parameter to `T` (true) if you want the search to care about uppercase and lowercase letters, or `F` (false) if you don't.
4.  Enter the **Search term** you want to find. This can be new text or a text variable you already have.
5.  Enter the **Text** you want to search within. This can be new text or a text variable you already have.

### Step 2: Get the Results

1.  Create an **Indices** variable. This must be an `IntArray` type.
2.  The step will put the starting positions of all found items into this `IntArray` variable.

## Parameters Explained

**Step name** (Optional)

-   A name you choose for the process step. This helps you find the step in the editor.

**Case sensitive** (Required)

-   This controls if the search looks for exact matches in terms of uppercase and lowercase letters.
-   `T` (true): The search will find "Robotiq" but not "robotiq".
-   `F` (false): The search will find both "Robotiq" and "robotiq".
-   You can use an existing true/false variable for this setting.

**Search term** (Required)

-   The exact text you want to find inside the main text.
-   You can type in new text directly or use an existing text variable.

**Text** (Required)

-   The larger text where the search will happen.
-   You can type in new text directly or use an existing text variable.

**Indices** (Required)

-   An existing or new variable that holds an array of integers (`IntArray`).
-   This variable will store the starting position (index) of each time the search term shows up in the text.

## Related Articles

-   [Set Variable Value Step - Robotiq.ai Help Center](https://docs.robotiq.ai/en/article/set-variable-value-step)
-   [Contains Text Step - Robotiq.ai Help Center](https://docs.robotiq.ai/en/article/contains-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/46fd0993-ca7c-46d9-8f41-32f99c57fc98)
