There are already many answers. I am giving different types of requirements and solutions for string search with regex.
You can do with regex which contain word i.e like. Also you can use $options => i
for case insensitive search
Contains string
db.collection.find({name:{'$regex' : 'string', '$options' : 'i'}})
Doesn't Contains string
only with regex
db.collection.find({name:{'$regex' : '^((?!string).)*$', '$options' : 'i'}})
Exact case insensitive string
db.collection.find({name:{'$regex' : '^string$', '$options' : 'i'}})
Start with string
db.collection.find({name:{'$regex' : '^string', '$options' : 'i'}})
End with string
db.collection.find({name:{'$regex' : 'string$', '$options' : 'i'}})
Keep this as a bookmark, and a reference for any other alterations you may need.