$notRegexp

Filter records where a column’s value does not match the specified regular expression pattern. The $notRegexp method is used to exclude entries whose values match the given regular expression, allowing for advanced exclusion criteria based on dynamic text patterns.

await Member.$search({
    $where: {
        username: {
            $notRegexp: '^john|doe$'
        }
    }
});

Last updated