I have user input in a StringBuffer. I need to search for the word "the" and replace every occurrence with another string, "zee." How do I do this?
int theStart = sentence.indexOf("the"); int theEnd = theStart + "the".length(); sentence.replace(theStart, theEnd, "zee");
What I have only works for the FIRST occurrence.