In Selenium 2.42.2 and Firefox 29, what is wrong with this XPath expression using regex:
//button[matches(text(),'\s*ABC\s*')]
It gives the following error message:
[Exception... "The expression is not a legal expression." code: "12" nsresult: "0x805b0033 (SyntaxError)" location: "<unknown>"]