title: TextMate: Regex replacing $1 with following 0
body: <p>I'm trying to fix a file full of 1- and 2-digit numbers to make them all 2 digits long.</p>
  
  <p>The file is of the form:</p>
  
  <pre><code>10,5,2
  2,4,5
  7,7,12
  ...
  </code></pre>
  
  <p>I've managed to match the problem numbers with:</p>
  
  <pre><code>(^|,)(\d)(,|$)
  </code></pre>
  
  <p>All I want to do now is replace the offending string with:</p>
  
  <pre><code>${1}0$2$3
  </code></pre>
  
  <p>but TextMate gives me:</p>
  
  <pre><code>10${1}05,2
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance,
  Ross</p>