MongoRegex has been deprecated.
Use MongoDB\BSON\Regex
$regex = new MongoDB\BSON\Regex ( '^m');
$cursor = $collection->find(array('users' => $regex));
//iterate through the cursor
MongoRegex has been deprecated.
Use MongoDB\BSON\Regex
$regex = new MongoDB\BSON\Regex ( '^m');
$cursor = $collection->find(array('users' => $regex));
//iterate through the cursor