Well, in that case, just say it to your replacement command:
$text =~ s/(onValidate)\s*$re/$1/g; # or even $text =~ s/(?<=onValidate)\s*$re//g; print $text;
It gives:
onValidate
keep this
{
remove this {and {this}}
}
In reply to Re: Re: Re: pattern matching nested { }'s
by Caron
in thread pattern matching nested { }'s
by Gerard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |