This question is related to MongoDB Compass Community Version 1.17.0.
Code { location: /IL$|US$/i }
(with regex options) works with the Documents Filter tool, but with the Aggregations $match
pipeline stage the application says Expected "[" or AggregationStage but "{" found.
Code with no regex options, i.e., { location: /IL$|US$/ }
works in both the filter, and the aggregation tools.
How can I use regex options in the $match
pipeline stage of MongoDB Compass?