title: regex to match trailing whitespace, but not lines which are entirely whitespace (indent placeholders)
body: <p>I've been trying to construct a ruby regex which matches trailing spaces - but not indentation placeholders - so I can gsub them out.</p>
  
  <p>I had this <code>/\b[\t ]+$/</code> and it was working a treat until I realised it only works when the line ends are <code>[a-zA-Z]</code>. :-(  So I evolved it into this <code>/(?!^[\t ]+)[\t ]+$/</code> and it seems like it's getting better, but it still doesn't work properly.  I've spent hours trying to get this to work to no avail.  Please help.</p>
  
  <p>Here's some text test so it's easy to throw into Rubular, but the indent lines are getting stripped so it'll need a few spaces and/or tabs. Once lines 3 &amp; 4 have spaces back in, it shouldn't match on lines 3-5, 7, 9.</p>
  
  <pre><code>some test test  
  some test test      
  
  
    some other test (text)
    some other test (text)  
    likely here{ dfdf }
    likely here{ dfdf }        
    and this ;
    and this ;  
  </code></pre>
  
  <p>Alternatively, is there an simpler / more elegant way to do this?</p>