On 30 July 2010 23:33, Eric Blake <ebl...@redhat.com> wrote: >> and `no_sub' can't be set (because re_compile >> always overwrites it, as it does newline_anchor). > > Did you compile a pattern with grouping ()? I'm not sure, but the > behavior on no_sub may be conditional on whether there are any > sub-fields to return in the first place.
The code in re_compile_pattern says: /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); It doesn't seem to be conditional on grouping. -- http://rrt.sc3d.org