Regular Expressions
Match text with $regex.
Example
db.users.find({ name: { $regex: "^A", $options: "i" } })
db.users.find({ name: /da$/ })Exercise
Regex operator.
{ name: { : "^A" } }
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.