Handle replacements in strings of more than only 'wow' or 'mom'.

This also uses the regex for replacement, instead of iterating through
the string and checking each character.