W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2010

[FT] FTWildCardOption observations and question

From: Paul J. Lucas <paul@lucasmail.org>
Date: Sun, 13 Jun 2010 09:04:37 -0700
Message-Id: <4E0EF6CF-32D3-4677-B4CD-10EBC92A174E@lucasmail.org>
To: public-qt-comments@w3.org
Section 3.4.2 of the spec says:

> A question mark, asterisk, plus sign, or left curly brace that is not immediately preceded by a period is not treated as a qualifier.
> When "wildcards" is used, any character in a query string can be "escaped" by immediately preceding it with a backslash, "\". That is, a backslash immediately followed by any character represents that character literally, preventing any special interpretation that the "wildcards" option might otherwise attach to it. In particular:
> 1. Escaping a period prevents its interpretation as a wildcard.
> 2. Escaping a question mark, asterisk, plus sign, or left curly brace ensures that it is not interpreted as a qualifier.
> 3. An escaped backslash ("\\") represents a literal backslash.
> 4. If a query string is terminated by an unescaped backslash, an error is raised: [err:FTDY0020].

Assuming a given implementation's tokenizer ordinarily strips all punctuation characters (that is, when wildcards are not used), then #2 above is practically irrelevant since nobody would presumably write such a query, e.g., nobody would write:

	$x contains text "anybody there\?" using wildcards

since they could just write:

	$x contains text "anybody there?" using wildcards

without the backslash instead.  Additionally, I assume that:

	$x contains text "foo.\?bar" using wildcards

would be tokenized as:

	"foo." "bar"

since the \? represents a literal '?' which would be stripped by the tokenizer. True?

- Paul
Received on Sunday, 13 June 2010 16:05:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:31 UTC