I'm using django and I need to get some info from my MongoDB using a regular expression.
Running this directly into the mongo shell I get the results that I want:
db.recipe.find({"title.spanish": {"$regex" : /s[aáAÁ]lm[oóOÓ]n/i}})
Im trying to do the same query in django using raw but it is giving me a syntax error that I can't figure out.
recipes = Recipe.objects(__raw__={'title.spanish' : {'$regex' : /s[aáAÁ]lm[oóOÓ]n/i}})
Any suggestions of how can I do this query in django?