From: "David A. Black" Date: 2004-09-23T10:13:57+09:00 Subject: Re: Regexp Arity Hi -- On Thu, 23 Sep 2004, Florian Frank wrote: > On Thu, 2004-09-23 at 02:03, Nikolai Weibull wrote: > > * Gavin Sinclair [Sep 23, 2004 01:50]: > > > > Regexp#groups ? > > > > Regexp#groupcount? > > > > > > Regexp#ngroups > > > > Best by far, so far, > > Which groups are counted here? There are capturing groups and > non-capturing groups. Or is this the sum of those two numbers? > > At the moment I don't see any obvious reason to count those > groups in a Regexp at all. I should know everything about them > before I created the regexp. If I want to find out how many > captures I got after matching the regexp I can easily get that > info from MatchData#captures.size. I agree. It's sounding like this is being informally proposed as a new core method (rather than just discussed as something one might write ad hoc), and I haven't seen a case being made for it at all. David -- David A. Black dblack@wobblini.net