We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b202d1a commit 67434f2Copy full SHA for 67434f2
src/Jenssegers/Mongodb/Query/Builder.php
@@ -833,8 +833,8 @@ protected function compileWhereBasic($where)
833
$regex = str_replace('%', '', $value);
834
835
// Convert like to regular expression.
836
- if (starts_with($value, '%')) $regex = '^' . $regex;
837
- if (ends_with($value, '%')) $regex = $regex . '$';
+ if ( ! starts_with($value, '%')) $regex = '^' . $regex;
+ if ( ! ends_with($value, '%')) $regex = $regex . '$';
838
839
$value = new MongoRegex("/$regex/i");
840
}
0 commit comments