Skip to content
Snippets Groups Projects
Commit 609bfcfc authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Fixed error in regex

parent 1660b5f1
Branches
No related tags found
1 merge request!1262WIP: Resolve "Spendenseite Texte anpassen"
...@@ -1194,7 +1194,7 @@ class MetaGer ...@@ -1194,7 +1194,7 @@ class MetaGer
private function searchCheckStopwords($request) private function searchCheckStopwords($request)
{ {
// matches '[... ]-test[ ...]' // matches '[... ]-test[ ...]'
while (preg_match("/(^|.+\s)-(\S+)(?:\s(.+)|($))/si", $this->q, $match)) { while (preg_match("/(^|[^\s]+\s)-(\S+)(?:\s(.+)|($))/si", $this->q, $match)) {
$this->stopWords[] = $match[2]; $this->stopWords[] = $match[2];
$this->q = $match[1] . $match[3]; $this->q = $match[1] . $match[3];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment