Index // Instrx


Format:

instrx( haystack, regex )
instrx( haystack, regex, start )

Description:

Check to see if the text represented by the regular expression regex is contained in the string haystack. If it is, then this function will return the index of starting character of the first place where needle occurs. Otherwise, this function will return 0. You may also specify an optional starting location for the search to begin start. Note: string indices begin at 1.

See Also:

Instr

Example:

print instr("Hello", "lo")
print instr("101,222,333",",",5)
will print
4
8

Revised:

0.9.6.56