Use this solution to replace the string
public string Replace2ndOccurence(string inputStr, string valueToReplace2ndOccurance,string newString)
{
Match m = Regex.Match(inputStr, "((" + Regex.Escape(valueToReplace2ndOccurance) + ").*?){2}");
int index = 0;
if (m.Success)
index = m.Groups[2].Captures[1].Index;
inputStr = inputStr.Remove(index, valueToReplace2ndOccurance.Length);
return inputStr.Insert(index, newString);
}