($output = $string) =~ s/$regexp/$new/$suffix; [download]
In reply to unconventional string substitutions by halfcountplus