Hpricot

I need to use Hpricot to search through HTML, find links, and search through those links.

I've got as far as finding all the links links = page.search("/html/body//a")

How can I search through the links efficiently? For example, if I only want to find links that point to http://www.joe.net, how can I do this with Hpricot?

I also want to see if the link is nofollow or not.

Basically, to make a long question short, how can I search for certain HTML inside the Hpricot elements?

http://code.whytheluckystiff.net/hpricot/wiki/HpricotChallenge#WildcardinAttributeSearch

Should get you started.