How will I apply regex on mongo db's raw_query? I tried
{'foo.bar': {$regex:'.*test.*'}}
but django shell complained for an invalid syntax.
I also tried
{'foo.bar': '.*test.*'}
assuming that the regex will take effect. But the result is empty
Thanks in advance!