> -----Original Message-----
> From: Dennis Cote [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 23, 2008 2:22 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Query problem
> 
> [EMAIL PROTECTED] wrote:
> >
> > 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 '*[]]*'
> >
> So to match the OP's original string he would need to use
> '*1[[][]]1.txt' as his pattern?
> 
> With each of the square brackets to be matched escaped by a pair of
> enclosing square brackets.

Square brackets don't "escape" thing that way: [[] is a character class
containing only the character '['.  [][], however, is a character class
containing two characters.  The special rule is that the first character
after the opening '[' is part of the class even if it's a ']' or a '-'.

-- James


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to