Had the same problem. Found the following (linked from the
XPath Tutorial) to be extremely helpful:
http://docs.python.org/library/re.html
It's pretty long, though, and it's hard to remember all the rules unless you use it frequently. I just keep the page open and refer to it every so often when playing with regular expressions in Calibre.