From eb3a55d6e02017d31599e31baeafbb6d22737eb4 Mon Sep 17 00:00:00 2001 From: Calum Smith Date: Mon, 17 Feb 2020 20:35:15 -0500 Subject: [PATCH] Fix search modifiers claiming the whole query The regex was only restricting to characters without the Unicode property Other, which is most characters, including spaces. --- app/Support/Search/Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php index 330c44944a..6f51e55771 100644 --- a/app/Support/Search/Search.php +++ b/app/Support/Search/Search.php @@ -123,7 +123,7 @@ class Search implements SearchInterface { $filteredQuery = app('steam')->cleanString($query); $this->originalQuery = $filteredQuery; - $pattern = '/[[:alpha:]_]*:"?[\P{C}_-]*"?/ui'; + $pattern = '/[[:alpha:]_]*:(".*"|[\P{Zs}_-]*)/ui'; $matches = []; preg_match_all($pattern, $filteredQuery, $matches);