Strips the HTML tags of the strings. - CSharp System

CSharp examples for System:String HTML

Description

Strips the HTML tags of the strings.

Demo Code


using System.Text.RegularExpressions;

public class Main{
        /// <summary>
		/// Strips the HTML tags of the strings.
		/// </summary>
		/// <param name="source">The source string.</param>
		/// <returns></returns>
		public static string StripHtmlTags(string source)
		{//from   w  w w. j a v  a2 s  . co m
			return Regex.Replace(source, "<.*?>", string.Empty);
		}
}

Related Tutorials