Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Regular expression...

by murugu (Curate)
on Oct 08, 2010 at 07:05 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://864157]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found