Regula
$string=preg_replace("/\W/","",$string);
\W = "non-word" characters in perl regular expressions. Word characters
are 0-9, a-z, A-Z, and "_". To kill _ as well, do:
$string=preg_replace("/[_\W]/","",$string);
> -----Original Message-----
> From:
> [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED].
net] On Behalf Of qartis
> Sent: Saturday, January 26, 2002 3:22 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Any Ideas
>
>
> I'm guessing something along the lines of:
>
> --
> $string=str_replace("!","",$string);
> $string=str_replace("@","",$string);
> $string=str_replace("#","",$string);
> $string=str_replace("$","",$string);
> $string=str_replace("%","",$string);
> $string=str_replace("^","",$string);
> --
>
> etc.
>
>
> "Philip J. Newman" <[EMAIL PROTECTED]> wrote in
> message 003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip...
> Any Ideas how I can remove !@#$%^&*()_+=-';:"/.,<>?
> charactors from a
> string?
>
> Philip J. Newman
> Philip's Domain - Internet Project.
> http://www.philipsdomain.com/ [EMAIL PROTECTED]
> Phone:
> +64 25 6144012
>
>
>
>
> --
> 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]
>
>
--
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]