how to use contains in mongodb query code example Example: contains mongo-query string db.users.findOne({"username" : {$regex : ".*son.*"}});