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;
In reply to Re: Re: Re: Substituting in the substitution!
by diotalevi
in thread Substituting in the substitution!
by Mondongo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |