human
How to use regular expression in lxml xpath?
assistant
Here is some code to get all `a` tags where the text starts with value `some text` using regex

doc.xpath("//a[starts-with(text(),'some text')]")

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.