Using webcontent in applications can be very annoying since webcontent usually contains lots of HTML elements. With one simple action, using regular expressions, all of these HTML elements can be removed from the content. What's left is a clean string, without HTML formatting. Snippet:
using System.Text.RegularExpressions;
...
public static string RemoveHTML(string in_HTML)
{
return Regex.Replace(lv_HTML, "<(.|\n)*?>", "");
}
| Enquiry | |
| Contact us | ||
|
||