Remove Html Links - CSharp System

CSharp examples for System:String HTML

Description

Remove Html Links

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 . j  a v  a2s.c om

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

Related Tutorials