To match fields with string values. You can also look for full text using $text
db.movieDetails.find({βawards.textβ: {$regex: /^Won .*/}})
Slashes delimit the regular expression
The char ^ means start at the beginning of the field we are matching
Then match exactly the characters stated
The . means match any character
The * means match any number of times
Last updated 6 years ago