the
regOffset
of
(
needle ,
haystack )
regOffset
(
needle ,
haystack )
Haystack yields any string
. Needle yields a string
describing a regular expression.
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
.
This function is similar to regInstr
, but the arguments are in reverse order.
offset
, csOffset
, trOffset
, instr
, csInstr
, regInstr
, trInstr
, rinstr
, csRinstr
, regRinstr
, trRinstr