Go to the first, previous, next, last section, table of contents.


Using Byte Offsets

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


Go to the first, previous, next, last section, table of contents.