In article <002801c1a6ed$1a9c10a0$0401a8c0@philip>,
[EMAIL PROTECTED] (Philip J. Newman) wrote:
> $q=preg replace("/[ \W]/","",$q);
>
> I have this to remove all the bad things, but it takes out the space to ...
> )o; why?
There's a space in your character class, so of course it will be among the
characters matched/replaced. But merely deleting it from the character
class doesn't solve the problem either, since a space character also meets
the criteria for "not a word character" (\W). If the objective is to strip
all characters that are neither a space nor a "word" (a-zA-Z0-9_), then try:
$q=preg replace("/[^ \w]/","",$q);
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]