Strip all HTML tags
| C# Code Snippets |
| See also |
| edit |
This C# code snippet removes all HTML tags from the specified string and returns the stripped string.
using System.Text.RegularExpressions; ... const string HTML_TAG_PATTERN = "<.*?>"; static string StripHTML (string inputString) { return Regex.Replace (inputString, HTML_TAG_PATTERN, string.Empty); }