RE: [PHP4BETA] Bug in PHP4.0b3 perl-compatible regex?

From: Date: Wed, 08 Dec 1999 23:10:47 +0000
Subject: RE: [PHP4BETA] Bug in PHP4.0b3 perl-compatible regex?
Groups: php.version4 
Request: Send a blank email to php-version4+get-7688@lists.php.net to get a copy of this message
Use the pcre from the CVS tree and recompile php beta 3, there was an issue with the regular expressions released in Beta 3. Regards, Vincent Power System Administrator Macdonald Harris & Associates > -----Original Message----- > From: Garth Hitchens [SMTP:garth@spoke.net] > Sent: Wednesday, December 08, 1999 3:58 PM > To: php4beta@lists.php.net > Cc: devteam@spoke.net > Subject: [PHP4BETA] Bug in PHP4.0b3 perl-compatible regex? > > I'm trying to make a perl-compatible regular expression work properly > under php 4.0b3, and am frustrated by a weird behavior. At first I > thought it was a lack of understanding, but now I'm pretty convinced > it's a farily serious bug. > > Here's my simple test file... > > ---- > > <?php > > print preg_replace('/<(\w+)>/','\\1', > 'This <tests> removing <some> braces from a <string>'); > > ?> > > ---- > > And here's the result of three consecutive reloads of the page... > > This tests removing fro braces from a Üw,ûÀ? > This tests removing fro braces from a Üøs¸ > This tests removing fro braces from a k > > Note that I've tried lots of permuations of this, including double > quotes with lots more escaping, etc, but the behavior is the same. > > I'd use standard regex but what I really want is to use pcre with the /e > modifier to evaluate some expressions in some strings. > > Anybody have any ideas why this is happening? ANy ideas for > workarounds? Is this a known bug in php4b3 or am I doing something > wrong? > > I'm running php 4.0b3 under Apache 1.3.9, under apxs. > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#7688) next »