Commit 4cdb4fba authored by Jens Segers's avatar Jens Segers

Fix #719

parent a2f4eca3
......@@ -930,7 +930,9 @@ class Builder extends BaseBuilder {
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, '%')) $regex = '^' . $regex;
......
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