[xquery-talk] [xsl] Re: backticks in regex - tales of the unexpected part II

David Carlisle davidc at nag.co.uk
Mon Apr 7 09:49:52 PDT 2014


On 07/04/2014 17:35, Ihe Onwuka wrote:
> Just going by the definition of the \w class in MK's XPath 2.0
> reference - \w -> a character considered to form part of a word

It isn't (and can't) mean a character that _you_ consider a word, since
it's not a user (or even locale) dependent expression. So it has to mean
what someone considered (very loosely) to be a "word". Including spacing
accents in that list doesn't seem unreasonable.


> So it's TS if backtick isn't a word character in your vocabulary.

No just that if you are writing vocabulary specific regex you need to
use vocabulary specific regex terms. If I'm looking for words in English
I tend to use [a-z] even if some people try to sneak accents into cafe
or naive :-)

David



More information about the talk mailing list