模糊查询:tname包含某个关键字测试‘
cd /opt/soft/mongodb/bin
./mongo --host 192.168.0.1 --port 17017 test
db.test_info.find({"tname": {$regex: ‘测试‘, $options:‘i‘}})
db.test_info.find({"tname": {$regex:/测试.*/i}})
时间: 2024-11-06 18:34:13
模糊查询:tname包含某个关键字测试‘
cd /opt/soft/mongodb/bin
./mongo --host 192.168.0.1 --port 17017 test
db.test_info.find({"tname": {$regex: ‘测试‘, $options:‘i‘}})
db.test_info.find({"tname": {$regex:/测试.*/i}})