This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regex: Will re_nsub be zero if REG_NOSUB was passed to regcomp?


On 08/08/2014 11:30 AM, frank ernest wrote:
> Regex: Will re_nsub be zero if REG_NOSUB was passed to regcomp?

>From a programming portability perspective, the value of re_nsub in this
case could be either zero or the number of subexpressions, or anything
in between; you've told regcomp you don't care about anything but
pass/fail. You should not be checking this value and expecting a
consistent or portable result.

Is there a context in which having this be determinate is of value?


-- 
Mark Brown
ms_brown@sbcglobal.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]