You can write it like this:
db.users.find({"name": /.*m.*/})
Are you interested in learning SQL from scratch! Have a look at this interesting video on SQL provided by Intellipaat:
or, like this code:
db.users.find({"name": /m/})
Basically, you are looking for something that includes “m” somewhere (i.e. ‘%’ operator of SQL is equivalent to Regexp’s’.*’), not something that contains “m” anchored to the beginning of string.