--- In perl-beginner%40yahoogroups.com">perl-beginner
yahoogroups.com,
"jonnybongas2" <jonnybongas2
...> wrote:
>
> I have a variable like the one below. It contains nested braces
pair.
> I'd like to create a regexp that changes the variable value to the
> string "hello world". Can anyone help with me this?
>
> $test = "hello
> {{ text
> {{innerbrace}}
> some text
> {{innerbrace2}}
> some text
> }} world";
>
>
> //John
>
#!c:/perl/bin/perl.exe -w
use strict;
use diagnostics;
my $line = "hello
{{ text
{{innerbrace}}
some text
{{innerbrace2}}
some text
}} world";
print "$line was: $linenn";
$line =~ s/n//g;
$line =~ s/{{.+}}//;
print "$line now: $linen";
.