title: Parse and add url from clipboard
body: <p>I need a javascript bookmark to take the url I have in the clipboard parse out the 2 numbers and create a new url, and add a link to the top of the page, that when clicked adds the url to my bookmark menu.</p>
  
  <p>Say I have url's like these</p>
  
  <pre>http://www.website.com/frontpageeditor.jhtml?sectionID=2844&poolID=6276</pre>
  
  <pre>javascript:getPoolPageUrl(9800,22713)</pre>
  
  <p>Then I need to add the numbers to this url</p>
  
  <pre>javascript:frames['content'].getPoolPageUrl(9800,22713)</pre>
  
  <p>and then add the url to the top of the frame "content".</p>
  
  <p>I have tried forever on this, but I can't figure out it out.</p>
  
  <p><br /><br />
  <b>Update</b><br />
  I've put something together, to show you what I need. This one doesn't work though. <br /><br />Any ideas why?</p>
  
  <pre><code>var url = window.clipboardData.getData('Text');
  var reg = /(\d+)/g;
  var matches = url.match(reg); //returns ["2844","6276"]
  var newUrl = "javascript:frames['content'].getPoolPageUrl("+matches[0]+","+matches[1]+")";
  var link = document.createElement('a');
  link.src = newUrl;
  frames['content'].document.body.appendChild(link);
  </code></pre>
  
  <p><br /><br />
  <b>Update2</b><br />
  This works. Any changes I can do to make it even better?</p>
  
  <pre><code>var url = window.clipboardData.getData('text');
  var matches = url.match(/(\d+)/g);
  var link = frames['content'].document.createElement('a');
  link.href = "javascript:frames['content'].getPoolPageUrl("+matches[0]+","+matches[1]+")";
  link.innerHTML = document.title;
  frames['content'].document.body.appendChild(link);
  </code></pre>