php,$collection>find(["field" => new \MongoDB\BSON\Regex("pattern", "i")]);,
``php,$collection>find(["field" => new \MongoDB\BSON\Regex("pattern", "i")]);,
``php,$collection = $mongodb>selectCollection('your_collection');,$query = ['name' => new MongoDB\BSON\Regex('pattern', 'i')];,$results = $collection>find($query);,
`,,这里
pattern是你要匹配的字符串模式,
i`表示不区分大小写。Powered By Z-BlogPHP 1.7.3
Copyright Your WebSite.Some Rights Reserved.