title: Remove string with known start and end string c#
body: <p>I have a HTML page string and I want to remove some string from the beginning of the HTML page. The code that I want to remove can be </p>
  
  <p><code>&lt;!DOCTYPE HTML&gt;</code></p>
  
  <p>or </p>
  
  <p><code>&lt;!DOCTYPE anything in between&gt;</code></p>
  
  <p>Regardless, it always start with <code>&lt;!DOCTYPE</code> and ends with <code>&gt;</code>. How do I search this line and remove it from the HTML page?</p>
  
  <p>So far, I manage to search and remove the first string with <code>&lt;!DOCTYPE HTML&gt;</code> using the following code</p>
  
  <pre><code>PageString = e.Result.Replace("&lt;!DOCTYPE HTML&gt;", "").Trim();
  </code></pre>
  
  <p>But how about the second one?</p>