How can I remove <table>, <tr>, and <td> HTML tags plus non-ASCII characters from a string using C#?
I want to leave other tags in the string alone.
How can I remove <table>, <tr>, and <td> HTML tags plus non-ASCII characters from a string using C#?
I want to leave other tags in the string alone.
Depending on why you want to do this, I'd recommend against trying. There are many pitfalls, even with Regex.
Personally I'd recommend encoding the input, rather than trying to strip stuff out of it.
Check these questions:
Using C# regular expressions to remove HTML tags
How can you strip non-ASCII characters from a string? (in C#)
Simple Google search: http://en.csharp-online.net/Strip_all_HTML_tags