Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
more useful options
 
PerlMonks  

Re: Trying to count the captures in a compiled regular expression

by japhy (Canon)
on May 03, 2004 at 16:07 UTC ( #350064=note: print w/ replies, xml ) Need Help??


in reply to Trying to count the captures in a compiled regular expression

In lieu of my unfinished Regexp::Parser, you could use Graham Barr's Regexp module, which allows you to say:

use Regexp; my $rx = Regexp->new('pattern'); my $nparens = $rx->nparens;
His module is not a parser like mine is, but rather, an XS interface to the C code behind the regex engine.
_____________________________________________________
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:??;


Comment on Re: Trying to count the captures in a compiled regular expression
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://350064]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-04-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls