1
Answer

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

Ashish Dhyani

Ashish Dhyani

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