Replace all occurrences of a word in a string