想在mongoDB正则表达式中按整数值搜索

时间:2016-03-10 07:32:20

标签: regex node.js mongodb mongoose

我有一个集合{mobile:123456789},{mobile:8877887799},{mobile:8899445588}所以在这里我想搜索模式以获得匹配的字段。

db.users.find({"$or":[{"mobile":/^88.*/}]}) if i did this code to search and want to get matched field "two". how can i do this.

0 个答案:

没有答案