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. SQLite
Keith,
This has really helped.
SQLite Tutorial site is using: 3.12.12016-04-08 15:09:49
fe7d3b75fe1bde41511b323925af8ae1b910bc4d
I get the same results as you did below. So, there is some sort of error
or different code being used. It may have to do with encoding. I will
test this furth
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 % wi
>sqlite3s < globtest.sql
select sqlite_version(), sqlite_source_id();
3.11.0|2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f
create table x(x text);
insert into x values('ABC');
insert into x values('5BC');
insert into x values('A5C');
insert into x values('AB5');
insert into x values(
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 convent
UmSnobol?
Nope absolutely deny all knowledge. Well.actually, didn't cut any code
in it but did hear about Spitbol. No I kid you not, sort of a super Snobol
I was led to believe. I was cutting Cobol at the time, eons ago. :-) A
colleague told me about it and I took a look but not a close on
Keith,
Thanks for the further explanation and the ll alias.
What is so hard to digest is that:
1. SQLiteMan - a Linux GUI does the *[^1-9]* pattern and omits rows
with digits 1-9 in them. Using 3.11.0.
2. DBBrowser - Linux GUI does the same using 3.9.2 and 3.11.0 in
different versions
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of Keith Medcalf
>>>Yes. The GLOB was invented on Unix. I posted an example of the Unix
>>>filename globbing (which has not changed, to my knowledge, since the 60's),
>>>which works exactly the same as the GLOB
Yes. The GLOB was invented on Unix. I posted an example of the Unix filename
globbing (which has not changed, to my knowledge, since the 60's), which works
exactly the same as the GLOB operator in SQLite 3.9.0 through the current head
of trunk. Perhaps there were minor changes, but nothing t
Aha! GLOB is an implementation of the UNIX Glob function. It just
borrows the regex character notation of [^1-9].
I have 3.15 and 3.16 CLIs installed. Trying any other CLI versions at
this point won't help for the customer. They will be using a SQLite3
GUI. I will explain the difference betwee
Yes, I am beginning to understand that. SQLite3 is its own GLOB standard.
I will abide by that.
It is just very confusing when 5 other apps using SQLite as their DB
engine all report the opposite.
The SQLite versions they use are 3.9.2, 3.10.1, 3.11.0 and 3.13.0.
Example: the SQLite Manag
DotAlign recently closed a $3.2 million round after blue chip client
validation, and we now seek to rapidly grow beyond our founding team. We seek
full stack engineers who are passionate about end user experience and
workflows, who also crave the opportunity to unlock value from data, and who
w
On 2017/01/04 9:14 PM, Keith Medcalf wrote:
~/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
~/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:
Apologies Jens, the final paragraphs in this reply where I used "you"
were intended to the OP (Ken Wagner) and not yourself, of course.
On 2017/01/04 7:51 PM, R Smith wrote:
On 2017/01/04 7:01 PM, Jens Alfke wrote:
On Jan 4, 2017, at 5:57 AM, R Smith wrote:
As I have it (and as is impleme
On 2017/01/04 7:01 PM, Jens Alfke wrote:
On Jan 4, 2017, at 5:57 AM, R Smith 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
> On Jan 4, 2017, at 5:57 AM, R Smith 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 commo
On 2017/01/04 4:11 PM, Ken Wagner wrote:
Simon,
Yes, I am using the SQLite3 CLI. That's how I discovered the different
GLOB outcomes.
I now understand that the SQLite3 GLOB function is not fully
documented so it's best to just experiment with the GLOB function at
the CLI for SQLite3. And
Richard,
Why, thank you, for your very prompt reply and resolution for this 'nit'.
If I can be of any assistance in testing (or taxing) the system, please
do inform me.
You have a jewel of a product and I enjoy using it immensely. Thanks for
all the perseverance and patience.
You must have
On 1/4/17, Simon Slavin wrote:
>
> On 4 Jan 2017, at 1:43pm, Ken Wagner wrote:
>
>> There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2.
>> It, too, omits any row where name contains any char 1 thru 9. It appears
>> SQLite at one point did this as 'GLOB '*[^1-9]*'.
>>
>> But
Ryan,
Both 'AB6' or '5AB' fail the '[^1-9]' test. So, too do 'New Vol 4' and
'#1'.
Ken
On 01/04/2017 07:57 AM, R Smith wrote:
On 2017/01/04 3:43 PM, Ken Wagner wrote:
Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted
the 1-9 char-containing entries.
However the logic o
Ryan,
The Regex description of '[^0-9]' states NOT any 0 thru 9 char in any
SINGLE char position. It can be amended to 1-9 or 3-7 or 1-4 as the user
sees fit.
Tested it using Ruby and Rubular, a Regex Tester.
HTH,
Ken
On 01/04/2017 07:57 AM, R Smith wrote:
On 2017/01/04 3:43 PM, Ken Wa
Ryan,
I will use the SQLite3 CLI as the acid test.
But I still don't grasp why v 3.11.0 honors the GLOB by omitting any row
where name contains a 1 thru 9 char but 3.15.0 and 3.16.0 do not.
I expect I have missed a deprecation. It's just confusing and extra
nit-picking and testing.
Thanks
Simon,
Yes, I am using the SQLite3 CLI. That's how I discovered the different
GLOB outcomes.
I now understand that the SQLite3 GLOB function is not fully documented
so it's best to just experiment with the GLOB function at the CLI for
SQLite3. And avoid using SQLite3 versions prior to 3.15.
Ryan,
FWIW -- I upgraded the DB Browser from v. 3.9 to v 3.11.0. This too
honors the GLOB '*[^1-9]*' by omitting any entry with a 1 thru 9 in it
in any char position.
This sqlitebrower is on git hub. It's a nice SQLite tool. (So far...)
Ken
On 01/04/2017 07:13 AM, R Smith wrote:
Just one
On 2017/01/04 3:43 PM, Ken Wagner wrote:
Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the
1-9 char-containing entries.
However the logic of 'zero or any chars, then any single char NOT 1
thru 9, then zero or any chars' should OMIT any name with a 1 thru 9
in it regardl
On 4 Jan 2017, at 1:43pm, Ken Wagner wrote:
> There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2.
> It, too, omits any row where name contains any char 1 thru 9. It appears
> SQLite at one point did this as 'GLOB '*[^1-9]*'.
>
> But it does not do so now. Does SQLite3 p
Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the
1-9 char-containing entries.
However the logic of 'zero or any chars, then any single char NOT 1 thru
9, then zero or any chars' should OMIT any name with a 1 thru 9 in it
regardless if it is 'Vol. 3', for example, or 'Vol.
The "select trackid, name from tracks where name GLOB '*[^1-9]*';" query
works as expected and does NOT include names with 1 thru 9 in them in
SQLiteMan, a Linux/Ubuntu SQL manager. It uses SQLite as the DB backend.
The logic of any # chars but NOT 1 thru 9 plus any # chars means NOT
1,2,3,4,5
Just one more point of clarity, in case my previous explanation did not
high-light this:
The query:
select trackid, name from tracks where name GLOB '*[^1-9]*';
is completely different to the query:
select trackid, name from tracks where name NOT GLOB '*[1-9]*';
The prior excludes only names w
On 2017/01/04 7:17 AM, Ken Wagner wrote:
About 2/3 the way down the page at:
http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9].
select trackid, name from tracks where name GLOB '*[^1-9]*';
Works properly in SQLiteMan and the SQLite Tutorial. ( Two
different produc
Thanks Simon.
I solved the issue by making sqlite3 *dbhandle = NULL then testing it for a
null value afterwards. It works fine.
From: sqlite-users on behalf of
Simon Slavin
Sent: Wednesday, 4 January 2017 9:47 AM
To: SQLite mailing list
Subject: Re: [sqli
32 matches
Mail list logo