as a first try? Won't work with quotes in the replacement, but that's an easy one ;-): : $profane{qr/piss (us|you) off/i} = 'lift $1 off'; : : : : $text =~ s/($profanity)/eval '"'.$profane{$1}.'"'/ge; : :
In reply to Re: Turn Hate Mail to Love Letter: Regex Multi-Word/Phase Replace
by Skeeve
in thread Turn Hate Mail to Love Letter: Regex Multi-Word/Phase Replace
by chunlou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |