I am using Mongo DB with doctrine. I want to do pattern matching like below
db.user_logs.find({ "recipientName": /user1/i })
without using MongoRegex
class
$qb->field('recipientEmail')->equals(new \MongoRegex('/.*'.$textToSearch.'.*/i'));
purpose is to reach solution without creating class (if possible)