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.
Note:
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.
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable >
(Required)
This Dynamic Variable save the results True or False.
<Dynamic Variable >
(Optional)
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.

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.

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.

Last updated
Was this helpful?