Skip to content

Why does non greedy regexp fail? #2040

@stenci

Description

@stenci

Below two queries. The second group on the former query is greedy, on the latter is not.

Why does the former work and the latter doesn't?

SELECT * FROM "table" WHERE "field" REGEXP '(Color|Material)=(\w.*)($|,)';
SELECT * FROM "table" WHERE "field" REGEXP '(Color|Material)=(\w.*?)($|,)';

I asked this question in Stack Overflow, I got no answers, but a comment says "The regex library used behind the scenes is broken".

Is the regex library used by DB4S really broken?

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions