Go forward to Freeing POSIX Pattern Buffers.
Go backward to Reporting Errors.
Go up to POSIX Regex Functions.

Using Byte Offsets
------------------

  In POSIX, variables of type `regmatch_t' hold analogous information,
but are not identical to, GNU's registers (see 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 See 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]'.