Sorry for the very basic question, but there's no easy way to search for a string like that. I have searched in PHP Manual (Pattern Syntax & preg_replace) but I haven't found any answers.
This code is inside a function that receives the $filter parameter. What does that preg_replace serves for?
$filter = preg_replace('!\s+!', ' ', $filter);