http://qs321.pair.com?node_id=864157


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(;;);