To use regex in Xpath locators.To get all the links elements with attribute href that match:
You need to use the regex matches() function, like this:
this will click the div with 'id=checkboxes', or 'id=cheANYTHINGHEREboxes')
sel.get_attribute( '//a[regx:match(@href,return a list of the name attribute of
all the links that match the regex.
Be aware, that the matches function is not supported by all
native browser implementations of Xpath
(most conspicuously, using this in FF3 will throw an error: invalid xpath).
but it does seem to work with more Xpath functions, including 'matches' and 'ends-with'.