2017-08-06, 22:23
(2017-08-06, 17:55)pstrg Wrote: Some help: if I add a space after the apostrophe, it works.
Probably the code expects a space after the token, but that is not always the case.
I could mention two cases in which there should be no space before the next word:
D' (contracted preposition in French, Italian, Portuguese);
L' (contracted article in French).
In fact, the syntax should be, in the case of the German article:
Der [\w] or Der .*
instead
of Der[\w].
In that case,
L'[\w]
should work correctly.
I think you've overlook something on the default sort tokens: it's a \W not a \w. That means all no word character. That does not include _ and that's the reason why it's also listed.
the[\W_] catches "The Case" but not "Theory". For your case with "L'Armée des ombres" you've to add l'.
Der .* is completly wrong and will catch the whole title if the title starts with "Der", e.g. "Der Bergdoktor".
FYI: a ^ will be added automatically to each token to only catch the token if it's on the beginning of the title. Also "ignore case" is enabled for token regex.