mongodb查询

mongodb查询

db.products.find( { description: { $regex: /^S/} }

cd /opt/soft/mongodb/bin


db.test_info.find({"tname": {$regex: '测试', $options:'i'}}) 

db.test_info.find({"tname": {$regex:/测试.*/i}}) 

db.getCollection('yxfms_exception_log').find({"SystemCode": {$regex:/TMS.*/i}})

db.getCollection('yxfms_api_log').find({"RequestData.Data.UserName": {$regex:/chongqing.*/i}})

Last Updated:
Contributors: 刘荣杰