Search for pattern starting at index and return the index of the first character of the first match, or an empty string if there is no match. Searching stops at stopindex if given; otherwise it wraps around the ends of the text until the starting position is reached again. The following boolean keyword flags control the search: forwards or backwards select the direction (forward is the default); exact (the default) or regexp select literal or regular-expression matching; nocase makes the match case-insensitive; elide causes hidden text to be searched as well; nolinestop (regexp only) lets . and [^ match newlines; and strictlimits requires the whole match to lie within index and stopindex. If count is a Variable, the number of index positions in the match is stored in it.