// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Text.RegularExpressions; namespace E { public class Program { private static readonly Regex re = new Regex("<[^>]*>", RegexOptions.Compiled | RegexOptions.Singleline); public static String Strip(string s) { return re.Replace(s, ""); } public static void Main(string[] args) { string html = @" Test

Test

bla bla

mere bla bla

"; Console.WriteLine(html); Console.WriteLine(Strip(html)); } } }