Regex
7.2.5 Using Byte Offsets
In POSIX, variables of type regmatch_t hold analogous
information, but are not identical to, GNU's registers (see section 7.1.8 Using Registers). To get information about registers in POSIX, pass to
regexec a nonzero pmatch of type regmatch_t, i.e.,
the address of a structure of this type, defined in
`regex.h':
| | typedef struct
{
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
|
When reading in 7.1.8 Using Registers, about how the matching function
stores the information into the registers, substitute pmatch for
regs, pmatch[i]->rm_so for
regs->start[i] and
pmatch[i]->rm_eo for
regs->end[i].