Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
laziness, impatience, and hubris
 
PerlMonks  

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

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


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

use Regexp::Common qw /balanced/; my $re = qr{$RE{balanced}{-begin => "{{"}{-end => "}}"}}; $text =~ s/$re//g;


Comment on Re: 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://964923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2013-05-24 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (512 votes), past polls