in reply to How to not match some words but match all the others

Here's yet another example of how to replace something, but not everything without a loop.

$txt =~ s/($replacethis)/($1 ne "notthis" && $1 ne "nothistoo") ? "wit +hthis" : $1/ge;

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot