asg017 / sqlite-regex

A fast regular expression SQLite extension, written in Rust
Apache License 2.0
166 stars 7 forks source link

Does "MATCHES" work? #7

Closed greatvovan closed 1 year ago

greatvovan commented 1 year ago

From the documentation:

select 'foo' matches 'f';

The result is not shown, but if I try it, I experience the error:

$ sqlite-tools-osx-x86-3410000/sqlite3
SQLite version 3.41.0 2023-02-21 18:09:37
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .load ./regex0
sqlite> select 'foo' matches 'f';
Parse error: near "'f'": syntax error
  select 'foo' matches 'f';
                       ^--- error here

Is it supposed to work?

MacOS, official SQLite, latest everything.

asg017 commented 1 year ago

My bad, that was a typo in the documentation. It has now been fixed, only the REGEXP operator works with that syntax (select 'foo' regexp 'f';), or any of the other functions listed in docs.md