MongoDB 8 · Query and update operators
Search with a regular expression
Find names that start with Ad.
db.users.find({ name: /^Ad/i })
Official MongoDB 8 documentation
More query and update operators commands
- Match any of several values
- Combine conditions with OR
- Check that a field exists
- Match inside an array
- Add to an array
- Remove from an array
All query and update operators commands · MongoDB 8 cheatsheet