Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] ...no subject... From: CIMPOESU Teodor (teo <email protected>)
Date: 03/25/99

PT Dekker wrote:

> Dear ...
>
> I want to strip off some characters from a string
> The following doesn't seem to work :
>
> $stripped = ereg_replace("@$#^&*()", "'", $input);
>
> are there other ways to do this ?
>

most of those chars are special for a regex.You must escape them:
ereg_replace("[@ | \$ | # | \^| \& | \* | \( | \)]+","",$input)
I think it *should* work.

CIMPOESU Teodor, Web Programmer

@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo <email protected>,+(401)-330.47.28

official home page: http://www.digiro.net/

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>