Re: [PHP4BETA] Stupid new (to PCRE) question

From: Date: Fri, 05 May 2000 17:13:45 +0000
Subject: Re: [PHP4BETA] Stupid new (to PCRE) question
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14537@lists.php.net to get a copy of this message
Ahh. For some reason, I though this was supposed to be modifying $s in place. I think I shall update the example in the manual... --Joey Smith Please forgive the long sig: *** Notice To Bulk Emailers: Attention! Pursuant to US Code, Title 47, Chapter 5, Subchapter II, 227, any & all unsolicited commercial e-mail sent to this address is subject to a download and archival fee in the amount of the $1500 US and copies will be forwarded to domain administrators. Emailing denotes acceptance of said terms! On Fri, 5 May 2000, Andrei Zmievski wrote: > On Fri, 05 May 2000, Joey wrote: > > Am I the only one that can't make this work? > > > > <? > > $s = "foo <A> <a> <BAa>"; > > preg_replace("/(<\/?)(\w+)([^>]*>)/e", > > "'\\1'.strtoupper('\\2').'\\3'", > > $s); > > print "\n\$s => $s.\n"; > > ?> > > X-Powered-By: PHP/4.0RC2-dev > > Content-type: text/html > > > > > > $s => foo <A> <a> <BAa>. > > Eh, you forgot to assign the return value to $s. > > -Andrei > * Think digital, act analog. * >

« previous php.version4 (#14537) next »