Help for this page
sub subst_str { my $match = shift; ... .. $str =~ s/(<tag1[^>]*>\s*<tag2>\s*)<tag3>[^<]*<\/endtag3>/subst_str($1 +)/gsie; # note the /e