title: "Pattern not found" in Vim searching for HTML text
body: <p>I am editing an HTML document containing the line:</p>
  
  <pre><code>&lt;h2&gt;Table of Contents&lt;/h2&gt;
  </code></pre>
  
  <p>and many other lines like it. My cursor is currently placed at the beginning of this line. The command</p>
  
  <pre><code>:%s!&lt;h2&gt;(.+)&lt;/h2&gt;!&lt;h2&gt;&lt;a name="#link"&gt;$1&lt;/a&gt;&lt;/h2&gt;!g
  </code></pre>
  
  <p>Elicits</p>
  
  <pre><code>E486: Pattern not found: &lt;h2&gt;(.+)&lt;/h2&gt;
  </code></pre>
  
  <p>And the results are similar if I try to escape the parentheses for the capture group, or even omit them entirely:</p>
  
  <pre><code>:%s!&lt;h2&gt;\(.+\)&lt;/h2&gt;!&lt;h2&gt;&lt;a name="#link"&gt;$1&lt;/a&gt;&lt;/h2&gt;!g
  E486: Pattern not found: &lt;h2&gt;\(.+\)&lt;/h2&gt;
  :%s!&lt;h2&gt;.+&lt;/h2&gt;!&lt;h2&gt;&lt;a name="#link"&gt;$1&lt;/a&gt;&lt;/h2&gt;!g
  E486: Pattern not found: &lt;h2&gt;.+&lt;/h2&gt;
  </code></pre>
  
  <p>Can someone spot what I'm doing wrong?</p>