Skip to content

Commit c25900b

Browse files
authored
Merge pull request #1935 from divine/pr_1886
[Updated PR#1886] Fix Regex example
2 parents 2efa5af + d26a192 commit c25900b

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)