C# Class
Java
code posted
created at 12 Jul 13:37
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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); } } |
566 Bytes in 2 ms with coderay