mongodb starts with code example
Example 1: mongodb regex
{ <field>: { $regex: /pattern/, $options: '<options>' } }
{ <field>: { $regex: 'pattern', $options: '<options>' } }
{ <field>: { $regex: /pattern/<options> } }
Example 2: mongodb find starts with
db.users.find({"name": /.*m.*/})
Or, similar:
db.users.find({"name": /m/})