Re: problems with regex

From: Date: Sat, 27 May 2006 14:01:14 +0000
Subject: Re: problems with regex
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237004@lists.php.net to get a copy of this message
Merlin wrote: > Hi there, > > I am somehow lost when it comes to regex. I am trying to remove ! and ? > characters from a string. Could somebody please help me to get a working > regex running for that? > > I tried: $str = preg_replace('/\!\?\./', ' ', $str); > > Thank you for any help, > > Merlin > try $str = str_replace("?"," ",$str); $str = str_replace("!"," ",$str); :)

« previous php.general (#237004) next »