📜  mongodb recherche like - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:04.560000             🧑  作者: Mango

代码示例1
db.users.find({"name": /m/})
or
db.users.find({"name": /.*m.*/})

You're looking for something that contains "m" somewhere
(SQL's '%' operator is equivalent to Regexp's '.*'), 
not something that has "m" anchored to the beginning of the string.