$_ = 'anything'; my @capture_count; my $regex = qr/one(.*?)((two)(four))/; @capture_count = /(?:$regex)?/; print @capture_count." captures\n";
In reply to Re: Trying to count the captures in a compiled regular expression
by Roy Johnson
in thread Trying to count the captures in a compiled regular expression
by BooK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |