Title / Description
Code public static class StringUtil { private static readonly Regex HtmlTag = new Regex("</?.+?>", RegexOptions.Compiled); public static string StripHtml(this string inputString) { return HtmlTag.Replace(inputString, String.Empty); } public static string ReplaceCaseInsensitive(this string inputString, string oldValue, string newValue) { return Regex.Replace(inputString, Regex.Escape(oldValue), Regex.Escape(newValue), RegexOptions.IgnoreCase); } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code