
This function is used to find the index of a pattern in a field or named variable. A specified track or named variable is set to the zero based index or -1 if the source string is not contained. Note that an empty source string always sets the variable to -1. The search can be performed case insensitive and/or diacritical mark insensitive.
The index of the first character in a matched pattern is returned unless the Index after option is enabled, in which case the index of the first character after the matched pattern is returned.
The first occurrence of the pattern is matched unless the From the end option is enabled, in which case the last occurrence is matched.
The action test state will be set to true if the source string was found, otherwise false.
The source string and the optional named variable fields may contain any of the escape sequences described in Escape Sequences.
The function is intended primarily for grouped execution mode. In stepwise execution mode, the operation is only performed once on the first selected file.
See the Unicode Strings topic for additional information which affects the usage of this statement.