diff --git a/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts b/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts index f6e485c9fa..65f0e5d240 100644 --- a/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts +++ b/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts @@ -109,7 +109,7 @@ const appendWhereCondition = function (conditions, columnAliases: { break; } } else if (typeof condition === 'string') { - const matches = condition.match(/^(?:~(\w+))?\((\w+),(\w+),(.*?)\)(?:~(?:or|and|not))?$/) + const matches = condition.match(/^(?:~(\w+))?\(([\w ]+),(\w+),(.*?)\)(?:~(?:or|and|not))?$/) if (!matches) throw new Error(`${condition} : not a valid syntax`) switch (matches[3]) {