Commit afdd8c39 authored by Jens Segers's avatar Jens Segers

Fix #719

parent 28fd6ce5
......@@ -905,7 +905,9 @@ class Builder extends BaseBuilder
// Replace like with a Regex instance.
if ($operator == 'like') {
$operator = '=';
$regex = str_replace('%', '', $value);
// Convert to regular expression.
$regex = preg_replace('#(^|[^\\\])%#', '$1.*', preg_quote($value));
// Convert like to regular expression.
if (! starts_with($value, '%')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment