I want to search values having special characters such as ? ! $ / . @ > #
in a document.
I want to search values such as ?test
,
For example,
db.myCollection.find({ myKey : /.*?test.*/i });
OR
db.myCollection.find({ myKey : { '$regex' : '.*?test.*','$options' : 'i' });
What should I change here?