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
![](https://secure.gravatar.com/avatar/737b732b4073bfa6e251c33578b8e35e?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
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.