Please don't try and parse HTML yourself. To extract links from an HTML document, see
.
use the search box at the top of every PM page. I typed in 'extract links', and here are a few of the results it returned:
As an aside, please read some of the documentation on the site before posting. For a good starter, read all of the documents linked from