asg017 / sqlite-regex

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

REGEXP does not heed COLLATE NOCASE #21

Open mcsilver opened 6 months ago

mcsilver commented 6 months ago

Is it just me or does the following query generate unexpected results:

CREATE TABLE Names (
  Name TEXT COLLATE NOCASE
);

INSERT INTO Names VALUES ('Michael');

SELECT * FROM Names WHERE Name = 'michael' -- one row returned
SELECT * FROM Names WHERE Name REGEXP '^michael$' -- zero rows returned
SELECT * FROM Names WHERE Name REGEXP '^Michael$' -- one row returned