const s = 'cool' const regex = new RegExp(s, 'i') // i for case insensitive Posts.find({title: {$regex: regex}})