Mongodb 如何检查Mongo DB字段值包含。(点)

Mongodb 如何检查Mongo DB字段值包含。(点),mongodb,mongodb-query,Mongodb,Mongodb Query,如何显示所有文档哪个字段应包含(.)点 我使用以下查询显示字段(名称)包含(.)点,但它显示集合中的所有内容 db.getCollection('test').find({ "name": { $regex : ".*..*" } }) 请告诉我如何获取“名称”字段包含(.)点的文档列表 I got the MongoDB documents for field value that contains.(Dot) using the following Query. //MongoD

如何显示所有文档哪个字段应包含(.)点

我使用以下查询显示字段(名称)包含(.)点,但它显示集合中的所有内容

db.getCollection('test').find({
    "name": { $regex : ".*..*" }
})
请告诉我如何获取“名称”字段包含(.)点的文档列表

I got the MongoDB documents for field value that contains.(Dot) using the following Query.

//MongoDB Query - Get document list if name field value contains .(Dot),
db.getCollection('test').find(
{
    "name": { $regex : ".*\\.." }
})

Thanks & Regards,
Madhumathi Velusamy.