# Find

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to check whether the given text exists within the actual string and identify its position. The result is stored in a dynamic variable.

## **Syntax**

**Input Value**: `<actual string>;<string to find>;<wildcard>(Optional)`&#x20;

| Argument                               | Description                                                                                                                                                                                                                                                                                                     |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<actual string><br>(Required)</p>  | Provide the actual string where the search should be performed.                                                                                                                                                                                                                                                 |
| <p>\<string to find><br>(Required)</p> | <p>Provide the string that needs to be searched within the actual string.</p><p><br><strong>Note</strong>: If the third input is a <strong>wildcard</strong>, add the supported wildcard characters (? or *<em>*</em>) immediately after the string to define the search pattern (e.g., string\*/ string?).</p> |
| <p>\<wildcard><br>(Optional)</p>       | Provide the string as wildcard.                                                                                                                                                                                                                                                                                 |

{% hint style="info" %}
**Note**:&#x20;

* This action supports the following wildcard characters:
  * **?** - For single character,
  * **\*** - For single/multiple character.
* If the search needs to use wildcard characters, the third input must be **wildcard** (case insensitive).
* If the wildcard option is specified, the second input must contain the **?** or **\*** character.
* If the wildcard option is not specified, the action performs a normal find operation and does not search using wildcard characters.
  {% endhint %}

**Output Value**: `<Dynamic Variable>;<Dynamic Variable>(Optional)`

| Argument                                     | Description                                                     |
| -------------------------------------------- | --------------------------------------------------------------- |
| <p>\<Dynamic Variable ></p><p>(Required)</p> | This Dynamic Variable save the results **True** or **False**.   |
| <p>\<Dynamic Variable ></p><p>(Optional)</p> | This Dynamic Variable holds the index (position) of the string. |

### **Example 1:** Finding a String

In this example, we explain how to search for an exact string match within a string.

* **Action**: Find
* **Input Value**: I like this post amazing;like
  * The first argument (**I like this post amazing**) specifies the string in which the search will be performed.
  * The second argument (**like**) specifies the word to be searched.
* **Output Value**: {Status};{Position}
  * The first output variable (**{Status}**) stores the execution result with the following possible values:
    * **True**: If the word is found in the string.
    * **False**: If the word is not found in the string.
  * The second output variable (**{Position}**) stores the index position (e.g., **18**) of the matched word.
* **Logical Explanation**: The **Find** action takes the value from the **Input Value** column (**I like this post amazing;like**) and searches for the exact word (**like**) in the given string.\
  First, the action determines whether the specified word exists in the string and stores the result as **True** in the **{Status}** variable. After confirming the match, the action identifies the starting index position of the matched word (**18**) and stores it in the **{Position}** variable.

<figure><img src="/files/IVjj6dzlZOyZsYZZeRPz" alt=""><figcaption></figcaption></figure>

### Example 2: Finding String Using a Single-Character (?) Wildcard

In this example, we explain how to search for a text pattern where one character may vary.

* **Action**: Find
* **Input Value**: I like this post like amazing;like?;wildcard
  * The first argument (**I like this post like amazing**) specifies the string in which the search will be performed.
  * The second argument (**like?**) specifies the pattern to be searched, where the question mark (?) represents any single character that may appear after “like.”
  * The third argument (**wildcard**) indicates that the search is performed using wildcard characters.
* **Output Value**: {Status};{Position}
  * The first output variable (**{Status}**) stores the execution result with the following possible values:
    * **True**: If a matching pattern is found successfully.
    * **False**: If no match is found in the string.
  * The second output variable (**{position}**) stores the index position (e.g., **18**) of the matched word.
* **Logical Explanation**: The **Find** action takes the value from the **Input Value** column (**I like this post like amazing;like?;wildcard**) and performs a wildcard-based search on the given string.\
  First, the action checks whether the pattern (**like?**) matches any part of the string and stores the result as **True** in the **{Status}** variable. After confirming the match, the action identifies all starting index positions where the pattern occurs (**3** and **18**) and stores them in the **{Position}** dynamic variable.

<figure><img src="/files/vXGyx4qlX4iLNd10Cf69" alt=""><figcaption></figcaption></figure>

### **Example 3:** Finding String Using a Multi-Character (\*) Wildcard

In this example, we explain how to search for text patterns using a wildcard.

* **Action**: Find
* **Input Value**: I like this post like amazing;like amazing\*;wildcard
  * The first argument (**I like this post like amazing**) specifies the string in which the search will be performed.
  * The second argument (**like amazing\***) specifies the pattern to be searched, where the asterisk (\*) represents single or more characters that may appear after amazing.
  * The third argument (**wildcard**) indicates that the search is performed using wildcard characters.
* **Output Value**: {Status};{Position}
  * The first output variable stores the execution status with the following possible values:
    * **True**: If the matching pattern is found successfully.
    * **False**: If no match is found in the string.
  * The second output variable stores the starting position of the matched text (e.g., **18**) in the **{Position}** dynamic variable.
* **Logical Explanation**: The **Find** action takes the value from the **Input Value** column (**I like this post like amazing;like amazing\*;wildcard**) and performs a wildcard-based search.\
  First, the action verifies whether the pattern (**like amazing\***) matches any part of the string and stores the result as **True** in the **{Status}** variable. After confirming the match, the action identifies the starting index of the matched text (**18**) and stores it in the **{Position}** variable.

<figure><img src="/files/Bv3IjtOfbUG1bu1GKjoH" alt=""><figcaption></figcaption></figure>


---

# 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.avoautomation.com/avo-assure/actions/generic/string-operations/find.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.
