title: Is there a better way to do a regular expression search and delete in Emacs?
body: <p>In reading the emacs help and emacs wiki I haven't found an obvious way to search for a regular expression and then simply delete all the matching text it finds.   I originally thought I could use the regular expression search and replace feature <code>M-x query-replace-regexp</code>, but could not figure out how to replace my matches with an empty string.  Hitting return on an empty string would simply exit. The field highlighted by the incremental reg expr search (C-M-s) doesn't obey the same rules as a marked block of text.  Otherwise I would simply cut it (C-w).</p>
  
  <p>Consider the following scenario.  I wanted to strip the trailing zeros from a list of numbers that have 3 or more zeros.</p>
  
  <pre><code>0.075000
  0.050000
  0.10000
  0.075000
  </code></pre>
  
  <p>So this is the round about way I solved it.  </p>
  
  <pre><code>F3                - begin keyboard macro
  C-M-s for 000*    - forward regexpr search
                      match the trailing zeros find the first match
  C-&lt;SPC&gt;           - mark the position at the end of the match (after the last 0)
  C-M-r for [1-9]   - reverse regexpr search
                      match the reverse non-zero digit, mark is now on the non-zero digit
  C-f               - move mark forward one space
  C-w               - cut/kill the text
  F4                - end keyboard macro, run until list is processed
  </code></pre>
  
  <p>Surely there is a better way to do this.  Any ideas?</p>