Why not use regex?

/<A HREF="*(.+?)"*>/i

That will give you the URL.