There are various ways to accomplish this.
simplest-one
db.users.find({"name": /m/}){ <field>: { $regex: /pattern/, $options: '<options>' } }{ <field>: { $regex: 'pattern', $options: '<options>' } }{ <field>: { $regex: /pattern/<options> } }db.users.find({ "name": { $regex: "m"} })
More details can be found herehttps://docs.mongodb.com/manual/reference/operator/query/regex/