Hi Team,
I faced issue while using regex pattern in $in Operator using aggregation.
{
$match: { name: { $in: [ /tom/i, /harry/i ] }}
}
Above example works well with mongo compass but the same using in python wont work shows compile error near / .
I’ve tried using re package for this using pymongo in python base, but the aggregation query formed like below,
{
$match: { name: { $in: [ re.compile('/tom/i'), re.compile('/harry/i') ] }}
}
Please suggest what is that issue or I’m missing something here.
Regards,
Jitendra.