Skip to content

Commit 38d75d8

Browse files
mnphpexpertryan7n
andcommitted
Fix Regex example
Fixed a regex example which accepts two parameters instead of one http://docs.php.net/manual/en/mongodb-bson-regex.construct.php#refsect1-mongodb-bson-regex.construct-examples Co-Authored-By: ryan7n <[email protected]>
1 parent f35e255 commit 38d75d8

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)