Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Security Alert: Re: Re: Re: Trying to count the captures in a compiled regular expressionby ysth (Canon) |
on May 03, 2004 at 06:01 UTC ( [id://349925]=note: print w/replies, xml ) | Need Help?? |
Security alert: that will run code in (??{ }) / (?p{ }).
Maybe something like this instead?
Also, note that you have to add a () set and then subtract it from the count to be able to distinguish between 0 captures and 1 capture.
In Section
Seekers of Perl Wisdom
|
|