title: Extract all links from a string
body: <p>I have a javascript variable containing the HTML source code of a page (not the source of the current page), I need to extract all links from this variable.
  Any clues as to what's the best way of doing this?</p>
  
  <p>Is it possible to create a DOM for the HTML in the variable and then walk that?</p>