Re: preg_replace

From: Date: Mon, 11 Feb 2002 18:35:47 +0000
Subject: Re: preg_replace
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84305@lists.php.net to get a copy of this message
I tried that, but no luck, here is my code: for ($s=0; $s<=count($quote)-1; $s++){ $fields = str_replace("-", "", $quote[$s]); $fields = split("\t",$quote[$s]); -Scott On Mon, 11 Feb 2002, val petruchek wrote: > Why not use str_replace() or just pasre th? string with single for(;;) ? > Valentin Petruchek (aki Zliy Pes) > *** Cutthe beginning *** > http://zliypes.com.ua > mailto:val@zliypes.com.ua > ----- Original Message ----- > From: "Scott" <scott@scottah.com> > To: <php-general@lists.php.net> > Sent: Monday, February 11, 2002 7:14 PM > Subject: [PHP] preg_replace > > > > Can someone guide me on preg-replace (or other option). I have an array > > that I am splitting, but before I do that I want to remove all dashes(-), > > periods (.) and colons (;). Here is what I tried: > > > > $fields = preg_match_all("[.:-]", "", $policy[$p]); > > > > When I do everything remains in the file, is there a perl similar //g > > global switch I might be missing. > > > > Thanks, > > > > -Scott > > > > > > > > > > -- > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > --

« previous php.general (#84305) next »