import re
name = 'echo'
rexExp = re.compile('.*' + name + '.*', re.IGNORECASE)
res = db.find({'name':rexExp })
for rs in res:
print rs
pymongo模糊查询
最新推荐文章于 2024-09-30 15:25:25 发布
import re
name = 'echo'
rexExp = re.compile('.*' + name + '.*', re.IGNORECASE)
res = db.find({'name':rexExp })
for rs in res:
print rs