W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2003

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

From: David Carlisle <davidc@nag.co.uk>
Date: Mon, 18 Aug 2003 23:31:18 +0100
Message-Id: <200308182231.XAA01557@e3000>
To: ashokma@microsoft.com
CC: tobiasreif@pinkjuice.com, public-qt-comments@w3.org, jeni@jenitennison.com



> 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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:13 UTC