Re: Replacing 2 strings

From: Date: Mon, 30 May 2005 20:24:06 +0000
Subject: Re: Replacing 2 strings
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-216008@lists.php.net to get a copy of this message
On 30/05/05, Brian V Bonini <b-bonini@cox.net> wrote: [...] > > Again, an example that is as close to your real-world needs as possible > > would be very helpful. > > The original request was: "the text-to-replace is just in a var named > $text1". > > I read that to mean you'd already extracted "<^JIM_JONES>" into $text1 Sorry - my mistake/fault. $text1 always begins with <^JIM_JONES> by is followed by various other stuff: <^JIM_JONES> Leicester, 1720. Oxford, 1800 CONFIRMED: meeting at 19.10 And I'd like it to read, simply, JIM JONES: (I think having the name in Caps would be best for now) and leave the rest of the text unaltered: JIM JONES: Leicester, 1720. Oxford, 1800 CONFIRMED: meeting at 19.10 Things like "Leicester" need to be capitalised, and CONFIRMED needs to be in caps, so...hope this explains things a bit better. And if you're both too busy, no problem! Thanks, -- Will The Corridor of Uncertainty http://www.cricket.mailliw.com/ - Sanity is a madness put to good use -

« previous php.general (#216008) next »