title: Vim substitution with regex
body: <p>New to regex and I need to pattern match on some dates to change the format.</p>
  
  <p>I'm going from <code>mm/dd/yy</code> to <code>yyyy-mm-dd</code> where there are no entries prior to 2000.</p>
  
  <p>What I'm unfamiliar with is how to group things to use their respective references of <code>\1</code>, <code>\2</code>, etc.</p>
  
  <p>Would I first want to match on <code>mm/dd/yy</code> with something like <code>( \d{2} ) ( \/\d{2} ) ( \/\d{2} )</code> or is it as easy as <code>\d\d/\d\d/\d\d</code> ?</p>
  
  <p>Assuming my first grouping is partially the right idea, I'm looking to do something like:</p>
  
  <pre><code>:%s/old/new/g
  :%s/ ( \d{2} ) ( \/\d{2} ) ( \/\d{2} ) / ( 20+\3) - (\3) - (\1) /g
  </code></pre>
  
  <p>EDIT: Sorry, the replace is going to a <code>yyyy-mm-dd format</code> with hyphens, not the slash.</p>