as like in mongodb code example Example 1: like in mongodb db.users.find({"name": /m/}) Example 2: like in mongodb db.users.find({"name": /.*m.*/})