(mongodb >=1.0.0)
$pattern
$flags
$data
Refer the example at: http://docs.php.net/manual/en/mongodb-bson-regex.construct.php#refsect1-mongodb-bson-regex.construct-examples
ExampleFind names that start with "Al"$regex = new MongoDB\BSON\Regex ( '^Al');$cursor = $collection->find(array('name' => $regex));//iterate through the cursor