Keith,
It appears that the folks at SQLiteTutorial.net have a coding anomaly.
They are not following the UNIX / SQLite3 GLOB patterns. And so, too, do
the other guys.
I am adjusting my usage accordingly. I will advise users of the other
products to NOT use the GLOB "*[^1-9]*" pattern. SQLiteTutorial.net has
already been advised. (No reply, thus far in 2 days.)
Yeah, I guess it must be the Dim Sum!!
Many thanks,
Ken
On 01/05/2017 12:46 AM, Keith Medcalf wrote:
From the (current) source code:
/*
** Compare two UTF-8 strings for equality where the first string is
** a GLOB or LIKE expression. Return values:
**
** SQLITE_MATCH: Match
** SQLITE_NOMATCH: No match
** SQLITE_NOWILDCARDMATCH: No match in spite of having * or % wildcards.
**
** Globbing rules:
**
** '*' Matches any sequence of zero or more characters.
**
** '?' Matches exactly one character.
**
** [...] Matches one character from the enclosed list of
** characters.
**
** [^...] Matches one character not in the enclosed list.
**
** With the [...] and [^...] matching, a ']' character can be included
** in the list by making it the first character after '[' or '^'. A
** range of characters can be specified using '-'. Example:
** "[a-z]" matches any single lower-case letter. To match a '-', make
** it the last character in the list.
**
** Like matching rules:
**
** '%' Matches any sequence of zero or more characters
**
*** '_' Matches any one character
**
** Ec Where E is the "esc" character and c is any other
** character, including '%', '_', and esc, match exactly c.
**
** The comments within this routine usually assume glob matching.
**
** This routine is usually quick, but can be N**2 in the worst case.
*/
-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
On Behalf Of dandl
Sent: Wednesday, 4 January, 2017 23:18
To: 'SQLite mailing list'
Subject: Re: [sqlite] SQLite3 Tutorial error
A question: this appears to be the Posix standard for globbing ie Patterns
Used for Filename Expansion:
http://pubs.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_013_
003
And this is Linux:
https://linux.die.net/man/7/glob
Is this what Sqlite intends to conform to? Because the convention here is
[!0-9] and not [^0-9].
Regards
David M Bennett FACS
Andl - A New Database Language - andl.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users