diff --git a/wire/core/DatabaseQuerySelectFulltext.php b/wire/core/DatabaseQuerySelectFulltext.php index dc27e7c9..6394188c 100644 --- a/wire/core/DatabaseQuerySelectFulltext.php +++ b/wire/core/DatabaseQuerySelectFulltext.php @@ -1269,7 +1269,7 @@ class DatabaseQuerySelectFulltext extends Wire { if(strpos($likeValue, "'") !== false || strpos($likeValue, "’") !== false) { // match either straight or curly apostrophe - $likeValue = preg_replace('/[\'’]+/', '(\'|’)', $likeValue); + $likeValue = str_replace([ "'", "’" ], "('|’)", $likeValue); // if word ends with apostrophe then apostrophe is optional $likeValue = rtrim(str_replace("('|’) ", "('|’)? ", "$likeValue ")); }