Re: replace question.

From: Date: Mon, 11 Sep 2000 17:11:30 +0000
Subject: Re: replace question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16195@lists.php.net to get a copy of this message
preg_replace() now has an optional parameter to specify how many replaces to execute. Check the docs. Monte Jason Granum wrote: > > I'm trying to do an ereg_replace however I only want to replace the 1st > match in the text, not every match. I've scoured through the manual but > can't figure anything out. Basicly I'm looking for the equivilent to > Perls s/find/replace/; not s/find/replace/g; -- Thanks for any help > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.general (#16195) next »