in reply to Re: Re: Substituting in the substitution!
in thread Substituting in the substitution!
That's not bad. Consider this. I rolled your A-Z/ loop up and then did the substitution on a copy inside the RHS.
$expr =~ s(\[((?:[A-Z/]+)\s){4,4})\]){ my $match = $_; $match =~ s([/\s])(_)g; $match; }ge;
|
|---|