db.media.find({city:/HAD/i}) // Note the 'i' flag for case-insensitivity
db.media.find({'city' : {'$regex' : '.*HAD.*', "$options" : "i"}}); // Note the 'i' flag for case-insensitivity
db.company_profile.find({ "companyName" : { "$regex" : "Nilesh" , "$options" : "i"}});
db.zipcodes.find({city : "NEW YORK"}); // Case-sensitive
db.zipcodes.find({city : /NEW york/i}); // Note the 'i' flag for case-insensitivity
db.media.find({'city' : {'$regex' : '.*HAD.*', "$options" : "i"}}); // Note the 'i' flag for case-insensitivity
db.company_profile.find({ "companyName" : { "$regex" : "Nilesh" , "$options" : "i"}});
db.zipcodes.find({city : "NEW YORK"}); // Case-sensitive
db.zipcodes.find({city : /NEW york/i}); // Note the 'i' flag for case-insensitivity
No comments:
Post a Comment