title: Using Grep and BBEdit/Textwrangler to copy a set variable and paste it earlier in the line
body: <p>I have a long HTML document with a list of 10-digit text variables that I'd like to copy and paste into a link earlier in the line, for example:</p>
  
  <pre><code>&lt;a href="example.com/"&gt;1234567890&lt;/a&gt;
  </code></pre>
  
  <p>Into:</p>
  
  <pre><code>&lt;a href="example.com/1234567890"&gt;1234567890&lt;/a&gt;
  </code></pre>
  
  <p>So, a Grep pattern that finds the 10-digit variable, then copies and pastes it either 2 characters before it, or identifies the incomplete href and pastes it at the end of it.</p>
  
  <p>Any ideas?</p>