How to use regular expression in lxml xpath?
Posted
by Arty
on Stack Overflow
See other posts from Stack Overflow
or by Arty
Published on 2010-05-03T03:19:10Z
Indexed on
2010/05/03
3:28 UTC
Read the original article
Hit count: 375
I'm using construction like this:
doc = parse(url).getroot()
links = doc.xpath("//a[text()='some text']")
But I need to select all links which have text beginning with "some text", so I'm wondering is there any way to use regexp here? Didn't find anything in lxml documentation
© Stack Overflow or respective owner