http://www.perlmonks.org?node_id=349830


in reply to Count capturing parentheses in a compiled regexp

Once I get Regexp::Parser working (it's the update to YAPE::Regex), you'll be able to do this via:
use Regexp::Parser; # pushes itself to @Regexp::ISA print qr/.../->nparens;
_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;