Skip to content

Commit 43f6c0b

Browse files
committed
Merge pull request mongodb#1935 from divine/pr_1886
[Updated PR#1886] Fix Regex example
2 parents f35e255 + 38d75d8 commit 43f6c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Selects documents where values match a specified regular expression.
460460
```php
461461
use MongoDB\BSON\Regex;
462462

463-
User::where('name', 'regex', new Regex("/.*doe/i"))->get();
463+
User::where('name', 'regex', new Regex('.*doe', 'i'))->get();
464464
```
465465

466466
**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.

0 commit comments

Comments
 (0)