Regular expression is not failing to match [closed]

19 hours ago 3
ARTICLE AD BOX

I am trying to fail following:

((constraints+w+)?primary keys*(ons+conflicts+w+)?s*(autoincrement)?)?

against the following test string:

CREATE TABLE "temp1"(myid INTEGER , id INTEGER, name VARCHAR(100), FOREIGN KEY(id) REFERENCES temp(id), PRIMARY KEY(myid,id) ON CONFLICT IGNORE)

The regex is not matching as I need it to match PRIMARY KEY(myid,id) ON CONFLICT IGNORE.

I already have the regex that will match the part I need but I need this one to fail, but still match what is expected.

The question comes from Connecting 2 regular expressions doesn't work

EDIT:

Properly formatted regex -

((constraint\s+\w+)?primary key\s*(on\s+conflict\s+\w+)?\s*(autoincrement)?)?

Thx.

Please check the original question for more clarification.

EDIT:

I also need the regex to fail for the string like

CREATE TABLE temp(id INTEGER, id1 INTEGER, name TEXT);

This is legitimate in SQLite (for the table not to have PK).

Read Entire Article