Answers for "c# if string contains text remove it"

C#
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);
}
Posted by: Guest on August-25-2020
0

remove substring from string c#

string hello = "Hello Word";
string result = hello.Replace("lo Wo","");
Posted by: Guest on August-11-2021

Code answers related to "c# if string contains text remove it"

C# Answers by Framework

Browse Popular Code Answers by Language