title: How to delete regex match text in emacs?
body: <p>How can I delete some text  that match with a regex in emacs?</p>
  
  <p>I suppose that using:</p>
  
  <p><code>'(query-replace-regexp PATTERN EMPTY)</code></p>
  
  <p>and:</p>
  
  <p><code>'(replace-regexp PATTERN EMPTY)</code></p>
  
  <p>but they throw:</p>
  
  <p><code>perform-replace: Invalid regexp: "Premature end of regular expression".</code></p>