@REGEXINDEX[expression,string] : Returns the offset of the first match. The expression must be enclosed in double quotes if it contains any separator characters (space, comma, or tab). See Regular Expression Syntax for supported expressions. (This function is basically a wildcard-enabled @INDEX.)

 

Examples:

 

echo %@regexindex[def,abcdefgh]

3

 

echo %@regexindex[\d,abcd1234]

4