So I have a field called \'city\' in my results...the results are corrupted, some times it\'s an actual name, sometimes it\'s a number. The following code displays all the recor
you can also try like the following, using regular expression without using $regex
db.zips.aggregate([ {$project : { city : { $substr : ["$city",0,1] } }}, {$sort : {city : 1}}, {$match: { city:/[0-9]/}} ])