From d26a192f8cf5bca06a6ed30ca19b6cbba9627a48 Mon Sep 17 00:00:00 2001 From: Ditty Date: Thu, 30 Jan 2020 16:28:10 +0300 Subject: [PATCH] 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 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b30a3404e..2ff886541 100644 --- a/README.md +++ b/README.md @@ -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.