In MongoMapper I can use the following query to search for items based on regex match:
Foo.where(:name => /Foo.*/)
How can I search for items that their name
field do not match /Foo.*/
?
You can use $not
db.customers.find( { name : { $not : /acme.*corp/i } } );