-->

Friday, October 3, 2014

Queries to remember

In mongo, you can indeed use regular expressions! Look at the example below: we find and count all the matches containing mytag:
db.collection.find({"tags":{ $regex: '.*mytag.*', $options: 'i' }}).count()

No comments:

Post a Comment