MongoDB
 sql >> Base de Dados >  >> NoSQL >> MongoDB

Como usar $ regex no mongodb?


Tente usar $regex com $options
Customer.find({'name': { $regex: 'FOO', $options: 'i' }}).exec(function (err, customer) {
     console.log(customer);
})