Since v3.4 mappings are available for search operations, especially as matches for diacritical characters. While a search query with a specific value ($ eq opeartor or corresponding construct) will match letters and correspondent diacritics, the same is not the case if $ regex is used to achieve matching on a partial search string (a LIKE ').
Is there a way for a $ regex query to use matching just like a $ eq query?
consider an example testcoll collection:
{ "_id" : ObjectId("586b7a0163aff45945462bea"), "city" : "Antwerpen" },
{ "_id" : ObjectId("586b7a0663aff45945462beb"), "city" : "Antwërpen" }
this query will find both records
db.testcoll.find({city: 'antwerpen'}).collation({"locale" : "en_US", "strength" : 1});
the same query using a regular expression will not (finds a record only with "Antwerp")
db.testcoll.find({city: /antwe/i}).collation({"locale" : "en_US", "strength" : 1});