MongoDB in Find query using Perl-compatible regular expressions
Perl Express Description: Http://www.chinaunix.net/old_jh/25/159388.html
Example:
> db.post.find () { "_id" : objectid ("54a530c3ff0df3732bac1681"), "id" : 2, "name" : "Joe", "age" : 30, "Sex" : 1, " School " : " Marry " } { " _id " : objectid (" 54a530c3ff0df3732bac1680 "), " id " : 1, " name " : " Joe ", " Age " : 30, "Comments" : [ "Test2", "Test9", "test5" ], "Sex" : 1, "School" : "Marry" } { "_id" : objectid (" 54a9700e1b5afd45354fd086 "), " id " : 3, " test3 " : 3 } { "_id" : objectid ("54a9701c1b5afd45354fd087"), "id" : 4, "test4"  : 4 } { "_id" : objectid ("54a970281b5afd45354fd088"), "id" : 5, "Test5" : 5&nbSP;} { "_id" : objectid ("54a970351b5afd45354fd089"), "id" : 6 , "Test6" : 6 } { "_id" : objectid (" 54a970781b5afd45354fd08a "), " id " : 7, " test7 " : 7 } { "_id" : objectid ("54a970831b5afd45354fd08b"), "id" : 8, "test8"  : 8 } { "_id" : objectid ("54a970901b5afd45354fd08c"), "id" : 9, "Test9" : 9 } { "_id" : objectid (" 54a9709c1b5afd45354fd08d "), " id " : 10, " test10 " : 10 } { "_id" : objectid ("54aa8a90652d8bdfa0566d34"), "id" : 11, "test10" : 11 } > db.post.find ({"School":/m/i}) { "_id" : objectid("54a530c3ff0df3732bac1681"), "id" : 2, "name" : "Joe", "age" : 30, "Sex" : 1, "school" : "Marry" } { "_id" : objectid ("54a530c3ff0df3732bac1680"), "id" : 1, "name" : "Joe", "Age" : 30, "comments" : [ "Test2", "Test9", "Test5"  ], "Sex" : 1, "school" : "Marry"  }
/mode/I, indicating that the system receives//in the specified mode;
"MongoDB Learning Note 16" MongoDB query: Regular expression in Find