GetStringNumber

GetStringNumber — retrieves the index number of named substrings.

Synopsis

Regex.GetStringNumber(name)
    

Arguments

name

The name of a substring.

Returns

On success, a number greater than 1. On failure, a numeric error code less than 0.

  • car(errlist) = a numeric return code from the failing function

  • cadr(errlist) = a character position in the pattern where the error occurred, or 0.

  • caddr(errlist) = an error message, as a human-readable string

Description

If a pattern contains named substring matches, this method will retrieve the index number (starting at 1) of the substring corresponding to this name.