queries in mongodb to find a document containg a string code example Example: contains mongo-query string db.users.findOne({"username" : {$regex : ".*son.*"}});