I came across a neat method of replacing a string in loads ‘o’ files today.
Basically pipe the output of grep for your search string into sed doing a regex replace on the string.

grep -lre 'SEARCH_STRING' . | xargs -d'\n' sed -i "s/SEARCH_STRING/REPLACE_STRING/g"