Unverified Commit c25900b3 authored by Stas's avatar Stas Committed by GitHub

Merge pull request #1935 from divine/pr_1886

[Updated PR#1886] Fix Regex example
parents 2efa5af9 d26a192f
......@@ -460,7 +460,7 @@ Selects documents where values match a specified regular expression.
```php
use MongoDB\BSON\Regex;
User::where('name', 'regex', new Regex("/.*doe/i"))->get();
User::where('name', 'regex', new Regex('.*doe', 'i'))->get();
```
**NOTE:** you can also use the Laravel regexp operations. These are a bit more flexible and will automatically convert your regular expression string to a `MongoDB\BSON\Regex` object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment