Subject: Re: regex
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 07/03/1999 12:08:24
Checking the most excellent searchable mailindex showed
http://mail-index.netbsd.org/current-users/1996/10/29/0003.html
so I am now happy!
Cheers,
Patrick
Patrick Welche wrote:
>
> 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
>