RE: [xslt2 func/op] tokenizing "abba" to ("a","b","b","a")

> Yes, but the spec says that if reluctant quantifiers are used, i.e.
> those with ?

is .? really a reluctant match?  That would make ? in Xpath incompatible
with ? in perl, sed, emacs etc.  In perl at least you follow a normal
(greedy) quantifier with ? to make it reluctant, so you need ?? to get a
reluctant 0 or 1 match. A single ? is a greedy 0 or 1, just as a * is a
greedy 0 or more match and *? is reluctant.

see eg
http://www.perldoc.com/perl5.6.1/pod/perlre.html

David

Received on Monday, 18 August 2003 18:31:31 UTC