Re: Trying to remove bad charactors.
| From: | bvr | Date: | Mon, 28 Jan 2002 13:09:34 +0000 |
| Subject: | Re: Trying to remove bad charactors. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82391@lists.php.net to get a copy of this message | ||
Special characters must be escaped with a backslash:
$q = preg_replace("\!", "", $q);
or
$q = preg_replace( preg_quote("!@#$%^&*()"), "", $q);
bvr.
On Mon, 28 Jan 2002 11:24:30 +1300, Philip J. Newman wrote:
>I'm trying to replace !@#$%^&*() with nothing how ever every thing that I try it takes
>out the space too which is bad. Siggestions
>
>$q=preg replace("!","",$q);
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philipsdomain.com/
>info@philipsdomain.com
>Phone: +64 25 6144012
>