title: Use cases for regular expression find/replace
body: <p>I recently discussed editors with a co-worker.  He uses one of the less popular editors and I use another (I won't say which ones since it's not relevant and I want to avoid an editor flame war).  I was saying that I didn't like his editor as much because it doesn't let you do find/replace with regular expressions.</p>
  
  <p>He said he's never wanted to do that, which was surprising since it's something I find myself doing all the time.  However, off the top of my head I wasn't able to come up with more than one or two examples.  Can anyone here offer some examples of times when they've found regex find/replace useful in their editor?  Here's what I've been able to come up with since then as examples of things that I've actually had to do:</p>
  
  <ol>
  <li><p>Strip the beginning of a line off of every line in a file that looks like:<br>
  <code>Line 25634 :</code><br>
  <code>Line 632157 :</code></p></li>
  <li><p>Taking a few dozen files with a standard header which is slightly different for each file and stripping the first 19 lines from all of them all at once.</p></li>
  <li><p>Piping the result of a MySQL select statement into a text file, then removing all of the formatting junk and reformatting it as a Python dictionary for use in a simple script.</p></li>
  <li><p>In a CSV file with no escaped commas, replace the first character of the 8th column of each row with a capital A.</p></li>
  <li><p>Given a bunch of GDB stack traces with lines like<br>
  <code>#3  0x080a6d61 in _mvl_set_req_done (req=0x82624a4, result=27158) at ../../mvl/src/mvl_serv.c:850</code><br>
  strip out everything from each line except the function names.</p></li>
  </ol>
  
  <p>Does anyone else have any real-life examples?  The next time this comes up, I'd like to be more prepared to list good examples of why this feature is useful.</p>