Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"key":"a","regex":"a"},{"key":"b","regex":"a"}]
Query
db.collection.find({"$expr":{"$regexMatch":{"input":"$key","regex":"$regex","options":"i"}}})
Result