Using lxml trunk:
doc.xpath('descendant-or-self::*[starts-with(lower-case(@href),
"javascript:")]')
works, but:
doc.xpath('descendant-or-self::*[matches(@href, "^javascript:", "i")]')
Returns ["i"]. This does not seem right...?
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
| Write code, do good | http://topp.openplans.org/careers