Re: RFC 110 (v3) counting matches

[email protected] (Nathan Wiger)
Newsgroups perl.perl6.language.regex
Organization Sun Microsystems
Message-ID <[email protected]>
Mark-Jason Dominus wrote:
> 
> > >     $count = () = $string =~ /pattern/g;
> >
> > Which I find cute as a demonstration of the Perl's context concept,
> > but ugly as hell from usability viewpoint.
> 
> I'd really like to see an RFC that looks into making the following
> features more orthogonal:
> 
>         1. Return the number of matches
> 
>         2. Iterate over each match in sequence
> 
>         3. Return list of all matches
> 
>         4. Return a list of backreferences

Please see RFC 164. It can handle all of 1-3. v2, out hopefully by the
end of tomorrow, will be about 3 times the size and much more explicit
about these capabilities. It will also include a number of
backwards-compatible syntaxes.

-Nate
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.