Produce shorter regexps for XPathParser