~/test# uname -a
Linux raspberrypi 4.9.0-v7+ #939 SMP Thu Dec 15 18:07:48 GMT 2016 armv7l 
GNU/Linux
~/test# echo . > 5AB
~/test# echo . > A5B
~/test# echo . > AB5
~/test# echo . > 5
~/test# echo . > ABC
~/test# ll *[1-9]*
-rw-r--r-- 1 root root 2 Jan  4 12:11 5
-rw-r--r-- 1 root root 2 Jan  4 12:10 5AB
-rw-r--r-- 1 root root 2 Jan  4 12:10 A5B
-rw-r--r-- 1 root root 2 Jan  4 12:11 AB5
~/test# ll *[^1-9]*
-rw-r--r-- 1 root root 2 Jan  4 12:10 5AB
-rw-r--r-- 1 root root 2 Jan  4 12:10 A5B
-rw-r--r-- 1 root root 2 Jan  4 12:11 AB5
-rw-r--r-- 1 root root 2 Jan  4 12:11 ABC

> -----Original Message-----
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of R Smith
> Sent: Wednesday, 4 January, 2017 10:52
> To: sqlite-users@mailinglists.sqlite.org
> Subject: Re: [sqlite] SQLite3 Tutorial error
> 
> 
> 
> On 2017/01/04 7:01 PM, Jens Alfke wrote:
> >> On Jan 4, 2017, at 5:57 AM, R Smith <rsm...@rsweb.co.za> wrote:
> >>
> >> As I have it (and as is implemented by SQLite) the GLOB operator
> implements a REGEXP that matches against a regexp pattern
> > No, these are NOT regular expressions in the usual sense of the word.
> GLOB's syntax is incompatible with what are commonly called “regular
> expressions”, and its feature set is a lot more limited. (It may
> technically implement a type of regular expression in the underlying
> algorithmic sense, but I think using the term is misleading.)
> 
> Quite correct, I meant REGEXP as an internal function of the
> Regular-expression type, not the official "regular expression" syntax -
> So a "misleading term" then in your words. Allow me to be more clear
> then: GLOB in SQLite specifically matches Unix file globbing syntax
> (which is very different to official RegEx). 3rd party utilities can
> override both the internal REGEXP and GLOB functions with custom versions.
> https://sqlite.org/lang_expr.html#glob
> 
> The bit I don't know for sure is whether Unix file globbing will regard
> 'AB5' as matching '*[^1-9]*' or not? I know in SQLite it matches (and I
> believe this to be correct, but I could be mistaken and I don't have a
> Unix box handy to test).
> 
> Either way, the concern is more towards consistency than specific
> operation.
> The SQLite scripts I sent previously will reveal any difference between
> versions if they exist. Have you tried it on different versions of the
> CLI?
> 
> 
> _______________________________________________
> 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

Reply via email to