Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Regular expression...

by murugu (Curate)
on Oct 08, 2010 at 07:05 UTC ( #864157=note: print w/replies, xml ) Need Help??


in reply to Regular expression...

Not exactly a regular expression approach. Regexp::Common can be used for these.

use strict; use warnings; use Regexp::Common; my $string = ' =begin a bc d =end '; print $1 if $string=~/$RE{balanced}{-begin => "=begin"}{-end => "end"} +{-keep}/;

Regards,
Murugesan Kandasamy
use perl for(;;);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://864157]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2016-12-07 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.