If you were to use a pattern like the following, depending on the implementation, you should be able to find all of those characters and substitute them out:
$teststring = "#!TEST'\&"
$pattern = (!|&|\\|\')
$replacement = ''
echo preg_replace($pattern, $replacement, $teststring)
Should output:
'#TEST'