Dennis Cote <[EMAIL PROTECTED]> wrote:
>>
> SQLite seems to do the following:
>
> The glob syntax supports the following patterns:
> ? - matches any single character
> * - matches zero or more characters
> [seq] - matches any single character in seq
> [!seq] - matches any single character not in seq
>
> seq is one or more characters, such as abc. You may specify character
> ranges using a dash. For example, a-z0-9 specifies all of the characters
> in the English alphabet and the decimal digits 0 through 9.
>
> This appears to be slightly different than normal *nix globbing since
> SQLite uses '^' rather than '!' for the set inversion (if my reading of
> the source is correct).
GLOB is suppose to exactly mimic Unix, except that SQLite does not
break pattern matching at / boundaries the way the shell does.
So if the previous statement is true, it is a bug.
>
> It is not clear how you should escape these characters if you need to
> match them literally. It may not be possible, since these characters are
> not allowed in filenames and hence wouldn't need to be matched by *nix
> commands.
Unix allows *any* characters in filenames except \000 and /. You
can escape characters using [..]. To match a * anywhere in a string,
for example:
x GLOB '*[*]*'
The [..] pattern must contain at least one internal character. So
to match a "]" you can use the pattern
x GLOB '*[]]*'
--
D. Richard Hipp <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------