You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -460,7 +460,7 @@ Selects documents where values match a specified regular expression.
460
460
```php
461
461
use MongoDB\BSON\Regex;
462
462
463
-
User::where('name', 'regex', new Regex("/.*doe/i"))->get();
463
+
User::where('name', 'regex', new Regex('.*doe', 'i'))->get();
464
464
```
465
465
466
466
**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