title: stage changes in git based on regex
body: <p>A lot of my debug code is wrapped in a header/footer. Usually I run a script that just removes all of it from source before I stage and commit the changes. If the debug code needs to persist a commit I'll run <code>git add -p</code> and stage the chunks individually.</p>
  
  <p>My question is if it's possible to stage changes based on a regex? For example, given this snippet of javascript:</p>
  
  <pre><code>function littleNinja( sword ) {
      /* debug:start */
      console.log( sword );
      /* debug:stop */
      // do stuff
  }
  </code></pre>
  
  <p>I don't want git to stage the lines between and including <code>debug:start</code> and <code>debug:stop</code>, and my hope is that this process could be automated.</p>