Add regex support in pipeline operator `replaceAll`
It would be very nice to have something like this possible:
{ $replaceAll:
{ input: "$text", find: "/[;,.]/g", replacement: "." }
}
Many thanks !
1
vote
Abderrahim
shared this idea
-
Abderrahim commented
Otherwise, it is big pain to $match all documents containing a "string" with a $regex, replaceAll, combine with other documents not matching, then continue with the aggregation...
I might be wrong, please tell if it could be achieved easily otherwise.