how to remove certain string from a string c# code example
Example 1: c# string remove
string myString = "Hello Grepper Developers";
string newStr = myString.Remove(5);
string newStr2 = myString.Remove(5, 8);
Example 2: c# remove word from string
public static string RemoveHTML(string text)
{
text = text.Replace(" ", " ").Replace("<br>", "\n").Replace("description", "").Replace("INFRA:CORE:", "")
.Replace("RESERVED", "")
.Replace(":", "")
.Replace(";", "")
.Replace("-0/3/0", "");
var oRegEx = new System.Text.RegularExpressions.Regex("<[^>]+>");
return oRegEx.Replace(text, string.Empty);
}