[lxml-dev] matches()

Ian Bicking ianb at colorstudy.com
Tue May 29 05:52:51 CEST 2007


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


More information about the lxml-dev mailing list