If you use bash you could even do this:
Code:
$ foo="/old/uncle/doe"
$ echo "${foo/uncle/uncle/john/moo/cow}"
/old/uncle/john/moo/cow/doe
Sasha's solution is more portable, and is the one you should be using if you put #!/bin/sh in the header of your script. You can use almost anything in place of '/' in sed, that gives you quite a lot of freedom when dealing with strange strings.