regexd in mongodb code example
Example 1: mongodb regex case insensitive
db.collection.find({name:{'$regex' : '^((?!string).)*$', '$options' : 'i'}})
Example 2: mongodb regex
{ : { $regex: /pattern/, $options: '' } }
{ : { $regex: 'pattern', $options: '' } }
{ : { $regex: /pattern/ } }