title: Regular Expression, only replace first occurrence of HTML tag
body: <p>I've got several files that have double <code>&lt;body&gt;</code> tags in them (either on purpose or by accident). I'm looking to find the first occurrence <strong>only</strong> of the <code>&lt;body&gt;</code> tag and append it with additional HTML code. But the second occurrence shouldn't be affected. I'm using TextWrangler. The regex I'm using now replaces both occurrences rather than just the first.</p>
  
  <p>Text: </p>
  
  <pre><code>&lt;body someattribute=...&gt;
  existing content
  &lt;body onUnload=...&gt;
  </code></pre>
  
  <p>RegEx I'm using:</p>
  
  <pre><code>Find: (\&lt;body.*\&gt;)
  
  Replace with: 
  
  \n\1
  appended HTML code
  </code></pre>
  
  <p>Current result:</p>
  
  <pre><code>&lt;body someattribute=...&gt;
  appended HTML code
  existing content
  &lt;body onUnload=...&gt;
  appended HTML code
  </code></pre>
  
  <p>So it's adding my appended code twice. I just want it to happen to the first <code>&lt;body...&gt;</code> only.</p>