Ashish Dhyani

Ashish Dhyani

  • NA
  • 339
  • 207.6k

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

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

Answers (1)