Remove Html Tags - CSharp System

CSharp examples for System:String HTML

Description

Remove Html Tags

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Net;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;//from w w  w  .  java2 s  .  co  m

public class Main{
        public static string RemoveHtmlTags(this string text)
        {
            return Regex.Replace(text, "<[^>]*>", string.Empty);
        }
}

Related Tutorials