develooper Front page | perl.perl6.language.regex | Postings from August 2000

Re: RFC 110 (v3) counting matches

Thread Previous | Thread Next
From:
Nathan Wiger
Date:
August 28, 2000 15:13
Subject:
Re: RFC 110 (v3) counting matches
Message ID:
39AAE415.2AD9274@west.sun.com
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About