title: Emacs: regular expression replacing to change case
body: <p>Every once in a while I want to replace all instances of values like:</p>
  
  <pre><code>&lt;BarFoo&gt;
  </code></pre>
  
  <p>with</p>
  
  <pre><code>&lt;barfoo&gt;
  </code></pre>
  
  <p>i.e. do a regular expression replace of all things inside angle brackets with its lowercase equivalent.</p>
  
  <p>Anyone got a nice snippet of Lisp that does this? It's safe to assume that we're dealing with just ASCII values. Bonus points for anything that is generic enough to take a full regular expression, and doesn't just handle the angle brackets example. Even more bonus points to an answer which just uses <code>M-x query-replace-regexp</code>.</p>
  
  <p>Thanks,</p>
  
  <p>Dom</p>