【转】pymongo实现模糊查询

pymongo 模糊匹配查询
在mongo中这样实现

{'asr':/若琪/}

  

使用pymongo

两种实现方式

1.import re
{'asr':re.compile('若琪')}
2.{'asr':{'$regex':'若琪'}}

  

转自:https://blog.csdn.net/whd0310/article/details/41895163

原文地址:https://www.cnblogs.com/zhzhang/p/9483545.html