well that a bit annoying sorry i was presuming that it would work as standard java.
That means your going to have to do some dodgy loop function to go through your string i.e...
String str = "some words";
int getIndex = str.indexOf("words");
String tempStr = "";
if(getIndex >= 0)
tempStr = str.substring(0,getIndex);
tempStr += " crisps ";
tempStr += str.substring((getIndex + 5),str.length());
tempStr = " crisps "+ str.substring((getIndex + 5),str.length());
obviously this is simplistic as per your example youll probably have to come up with something a bit more complex.