If you mean by "didn't work" that your changed string wasn't available via the
output variable, then just try to assign it:
output = output.Replace(YourCode);
"[
String.Replace] does not modify the value of the current instance. Instead, it returns a new string in which all occurrences of oldValue are replaced by newValue." (from the linked MSDN page).