Functions

regInstr

Supported By

Syntax

[the] regInstr of ( haystack , needle )

regInstr ( haystack , needle )

Haystack yields any string. Needle yields a string describing a regular expression.

Description

The regInstr function returns the index of the first appearance of the regular expression needle in the string haystack, starting at 1. If needle cannot be found in haystack, zero is returned.

This function is regular expression-based. For a literal version of this function, see instr or csInstr.

Note

This function is similar to regOffset, but the arguments are in reverse order.

See Also

trInstr, regOffset, trOffset, regRinstr, trRinstr