Re: strings

From: Date: Sat, 02 Aug 2003 00:21:17 +0000
Subject: Re: strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158024@lists.php.net to get a copy of this message
* Thus wrote Anthony Ritter (tony@gonefishingguideservice.com): > In the following snippet, I'm trying to open and read a URL into the > variable $contents. > I'd like to use preg_replace() to return only part of that string beginning > with say - regional and ending with new - but I get the complete URL string > returned. > > [...] > > $newtext= preg_replace("/.*?(regional.*new).*/","1",$contents); This exact thing was talked about earlier today, with the subject 'Using eregi_replace()'. http://marc.theaimsgroup.com/?t=105974851200006&r=1&w=2 HTH, Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#158024) next »