你存的时候这个12不是字符串,是Number吧,db.xxx.find({ "$expr": { "$regexMatch": { "input": {"$toString": "$name"}, "regex": /12/ } } });
你存的时候这个12不是字符串,是Number吧,