标签: regex node.js mongodb mongoose
我有一个集合{mobile:123456789},{mobile:8877887799},{mobile:8899445588}所以在这里我想搜索模式以获得匹配的字段。
{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.