I want to remove all characters with ascii codes 32 - 47 and some more from string. Exactly !"#$%&'()*+,-./\~.
I tried:
$string = preg_replace('/\s\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\\~/', '', $string);
But it returned false. What am I doing wrong? Thanks.