bwangel
2016-04-05 17:17:55 +08:00
```
> db.user.find()
{ "_id" : ObjectId("56d7ced2a2aed7154cef7b03"), "email" : "ross@example.com", "first_name" : "Ross", "last_name" : "Lawley" }
{ "_id" : ObjectId("56d7d730a2aed7160b3f06c8"), "email" : "content", "first_name" : "xu", "last_name" : "yundong" }
> db.user.find({'email': {$regex: '^(.*@.*)$'}})
{ "_id" : ObjectId("56d7ced2a2aed7154cef7b03"), "email" : "ross@example.com", "first_name" : "Ross", "last_name" : "Lawley" }
```
这个是使用正则,匹配 @符号