Subject: Re: regexec(3) is broken or I am
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 12/14/2005 17:32:18
jklowden@schemamania.org wrote:
> erc = regcomp(&re, name_pattern, REG_EXTENDED|REG_ICASE);
...
> erc = regexec(&re, name_pattern, 1 + re.re_nsub, matches, 0);
Never mind. The test was broken. May future generations note well: pass
the pattern to regcomp() and the *string* to regexec().
Used correctly, libc yields expected results.
--jkl