Functions

regOffset

Supported By

Syntax

[the] regOffset of ( needle , haystack )

regOffset ( needle , haystack )

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

Description

The regOffset 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 offset or csOffset.

Note

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

See Also

trOffset, regInstr, trInstr, regRinstr, trRinstr