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)
<actual string> (Required)
Provide the actual string where the search should be performed.
<string to find> (Required)
Provide the string that needs to be searched within the actual string.
Note: If the third input is a wildcard, add the supported wildcard characters (? or **) immediately after the string to define the search pattern (e.g., string*/ string?).
<wildcard> (Optional)
Provide the string as wildcard.
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable >
(Required)
This variable holds the index (position) of the string.
<Dynamic Variable >
(Optional)
This Dynamic Variable save the results True or False.
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: {position}
The position of the matched word (18) is stored in this {position} dynamic variable.
If the second output variable is defined, it stores the action status with the following possible values:
True: If the word is found successfully.
False: If the word is not found in the string.
Logical Explanation: The Find action fetches the value from the Input Value column (I like this post amazing;like) and searches for the exact word (like) without using a wildcard. The matching position is identified at index (18) and stored in the {position} variable.

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: {position}
The position of the matched word (3,18) is stored in this {position} dynamic variable.
If the second output variable is defined, it stores the action status with the following possible values:
True: If a matching pattern is found successfully.
False: If no match is found in the string.
Logical Explanation: The Find action fetches the value from the Input Value column (I like this post like amazing;like?;wildcard) and searches for the string pattern (like?), where the question mark (?) represents any single character following “like”. The matching positions are identified at indexes 3 and 18, and stored in the {position} variable.

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: {position}
The position of the matched text (18) is stored in this {position} dynamic variable.
If the second output variable is defined, it stores the action status with the following possible values:
True: If the matching pattern is found successfully.
False: If no match is found in the string.
Logical Explanation: The Find action fetches the value from the Input Value column (I like this post like amazing;like amazing*;wildcard) and searches for the string (like amazing), where the asterisk * represents zero or more characters that may appear after amazing. The position of the match 18 (index of the string) is stored in the {position} variable.

Last updated
Was this helpful?