extract href from html
&lt;script language="javascript"&gt;
var a='&lt;a href="1" title="Passably ok, yes, why not. Perfect, no."&gt;'
document.write('&lt;a href="2" title="Real-world HTML is just really complicated."&gt;')
&lt;/script&gt;
&lt;style type="text/css"&gt;
p { font-family: "&lt;a href='3' title='...in so many ways'&gt;" }
&lt;/style&gt;