Subject: regex
To: None <netbsd-help@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 07/02/1999 18:31:59
Have any of you had any joy with regex(3)? I was under the impression that
a call to regexec would set nmatch to the number of elements in the array
regmatch_t pmatch[], though it apparently must be set before the call (and
therefore pmatch[nmatch] memory must be allocated beforehand.) Right so far?

Then the i parts that match should be the array of strings starting at
string+pmatch[i].rm_so and ending at string+pmatch[i].rm_eo
I am getting garbage, so I'd like confirmation that I'm reading the manpage
correctly!

Cheers,

Patrick