I want to match links like <a href="mailto:my@email.com">foo</a>, but this doesn’t work only works in Nokogiri:
doc/'a[href ^="mailto:"]'
What’s the right way of doing that? How do I do that with Hpricot?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This works on Hpricot:
Couldn’t figure out a way to do the xpath search though. Apparently, Hpricot doesn’t support
starts-with: http://wiki.github.com/hpricot/hpricot/supported-xpath-expressions