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.
This commit is contained in:
Calum Smith 2020-02-17 20:35:15 -05:00 committed by GitHub
parent e8bf53ad11
commit eb3a55d6e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);