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

Re^2: Efficient way to match and replace nested braces (etc.)

by Anonymous Monk
on Apr 13, 2012 at 07:42 UTC ( #964871=note: print w/ replies, xml ) Need Help??


in reply to Re: Efficient way to match and replace nested braces (etc.)
in thread Efficient way to match and replace nested braces (etc.)

Even better:

my $re = '{{(?:[^{}]+|'; $re .= $re x ($nested) . "\b" . ')*}}' x ($nested + 1);


Comment on Re^2: Efficient way to match and replace nested braces (etc.)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2013-05-20 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (408 votes), past polls