Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 imbibing at the Monastery: (10)
As of 2015-07-07 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls