1
Reply

How to remove the anchor tag from a string in C#

Ashish Dhyani

Ashish Dhyani

May 29 2012 9:26 AM
5k
String sample = "<a href=\"http://test.com\">LoremIpsum.Net</a> is.";
String re = @"<a [^>]+>(.*?)<\/a>";
sample =Regex.Replace(sample, re, "$1"));

Answers (1)