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

All query and update operators commands · MongoDB 8 cheatsheet

Was this page helpful?