How can I trim a string(6) \" page\", where the first whitespace is a 0xc2a0 non-breaking space?
string(6) \" page\"
I\'ve tried trim() and preg_match(\'
trim()
preg_match(\'
however here is my ONLY solution, because sometimes there are UTF8 spaces:
$stringg = preg_replace('/^[\pZ\pC]+|[\pZ\pC]+$/u','',$stringg); $stringg = preg_replace('/\s+/u', '', $stringg);