Using system.text.regularexpressions;
String mystring; mystring = "this is a test."; mystring = regex.replace (MyString, "IS", "WAS");