You can do this:
var str = "asp,mvc,c#,wpf";
var anotherStr = "<b>asp</b>,<b>wpf</b>";
var myArr = anotherStr.Replace("<b>", "").Replace("</b>", "").Split(',');
foreach (string value in myArr)
{
str = str.Replace(value, "<b>" + value + "</b>");
}
Console.WriteLine(str);
2
solved Replace the particular part of string? [closed]