I have a collection that contains a list field. The list field contains URLs. I want to search that field and pull out all documents where that pattern appears in at least one element in the list. This is one of my first attempts.
query = collection.find({
'third_party_urls' : {'$in' : ['/.woff/']}
})
This returns zero documents, but I know the condition is true in many cases. MongoDB's documentation states that I can't use the $regex operator in a list, but I can use js object regex. According to MongoDB and a quick google search about js regex, I write a pattern encapsulated in / /. So I am confident that I'm using js regex correctly, but no luck. Any ideas?