-1

I have some html :-

<blockquote>This is a quote</blockquote>
<p>This is the main post</p>

I want to remove the blockquote and its contents . I've tried : -

string strippedPost = Regex.Replace(post, "<blockquote>(.*?)</blockquote>", "");

But not had any luck with it. Is there a problem with the regex?

update: also tried

string strippedPost = Regex.Replace(post, @"<blockquote>(.*?)<\/blockquote>", "");
Shazoo
  • 685
  • 12
  • 25

1 Answers1

0

Can you try this?

 strippedPost = Regex.Replace(post, "<blockquote>(.|\n)*?</blockquote>", "");
user3429660
  • 2,420
  • 4
  • 25
  • 41