I am having a hard time figuring out what is happening with this regexp to match multiple whitespace :
$str = ' ';
if (preg_match_all('/\s{2,}/', $str, $matches)) {
var_dump($matches);
}
The fact is, if i replace str value with 3 "real" spaces, it works as expected, but obviously the characters in str are not whitespaces (copy paste from other source) !! But i need to match them to replace them with real spaces/whatever.
My question: What are those simple space looking characters in str and more important, how do i target them in a regexp ?