Already u got the answers but to match regex with case insensitivity
You could use the following query
db.users.find ({ "name" : /m/i } ).pretty()
The i
in the /m/i
indicates case insensitivity and .pretty()
provides a more pretty output
Already u got the answers but to match regex with case insensitivity
You could use the following query
db.users.find ({ "name" : /m/i } ).pretty()
The i
in the /m/i
indicates case insensitivity and .pretty()
provides a more pretty output