The regular expression syntax for the @matchPattern attribute in att.patternReplacement is defined as W3C XML Schema regex (for which I'm responsible, IIRC, so mea culpa). Hugh Cayless points out that by default, XML Schema regexes are anchored at both ends, which is severely restrictive. Instead, I think we should redefine it as XPath syntax:
which is based on XML Schema but adds a number of useful extras, including the availability of explicit anchors. I think this is just a corrigible error, and since the current definition is subsumed in the broader one I now propose, we can make this change with no detrimental effects.