> Drawing on some of the proposals for extended 'for' syntax: > for my($mo, $dy, $yr) ($string =~ /(\d\d)-(\d\d)-(\d\d)/g) { > ... > } > > This still requires that you know how many () matching groups are in > the RE, of course. I don't think I would consider that onerous. If ther regex is fixed at compile time, you can simple count. But if the regex varies at run time, it's not only onerous, it's pretty near to impossible.
- RFC 110 (v3) counting matches Perl6 RFC Librarian
- Re: RFC 110 (v3) counting matches Jonathan Scott Duff
- Re: RFC 110 (v3) counting matches Tom Christiansen
- Re: RFC 110 (v3) counting matches Jarkko Hietaniemi
- Re: RFC 110 (v3) counting matches Jarkko Hietaniemi
- Re: RFC 110 (v3) counting matches Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Nathan Wiger
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Damien Neil
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Philip Newton
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting ma... Bart Lateur
- Re: RFC 110 (v3) countin... Mark-Jason Dominus
- $& and copying: rfc ... Uri Guttman
- Re: $& and copying: ... Mark-Jason Dominus
- Re: $& and copying: ... Tom Christiansen
- Re: $& and copying: ... Mark-Jason Dominus
- Re: $& and copying: ... Mark-Jason Dominus
- Re: RFC 110 (v3) counting matche... Joe McMahon