Thanks for the assist ESS...
As it turns out (took a break from this), the minus sign must have special meaning and I missed it in the docs. I escaped the minus sign and everything works fine.
One note: Using "A-z0-9" only will allow the ^, backslash, and underscore characters to get through unless I use "A-Za-z". I noticed this on the two servers I have access to (Linux SMESRVR and a Windows WAMP).
PHP Code:
$string = "Testing O'Rielly 0123456789..~!@#$%^&*/\()_-=+";
$pattern = '/[^A-Za-z0-9 _\-\.]/';
echo $string." : ".strlen($string)."<br />";
$string = preg_replace($pattern, '',$string);
echo $string." : ".strlen($string)."<br />";
Yeah - my intent from the start was to make this a function in my functions.inc.php file. I just did it this way to try to figure things out.
Thanks