Strip Html - CSharp System

CSharp examples for System:String HTML

Description

Strip Html

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Net;
using System.Linq;
using System.Drawing;
using System;/*from ww  w.ja  v  a  2s .c o m*/

public class Main{
        public static string StripHtml(this string str) {
			return string.IsNullOrEmpty(str) ? str : Regex.Replace(str, @"<\/?[1-6a-zA-Z]+[^>]*>", "", RegexOptions.Multiline);
		}
}

Related Tutorials