Re: [PHP4BETA] Bug in PHP4.0b3 perl-compatible regex?
| From: | Garth Hitchens | Date: | Thu, 09 Dec 1999 01:39:54 +0000 |
| Subject: | Re: [PHP4BETA] Bug in PHP4.0b3 perl-compatible regex? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-7689@lists.php.net to get a copy of this message | ||
Yep that fixed it! Thanks. For anyone else that has this problem,
you'll have to do some selective code copying from CVS to the beta 3
trees to fix this. I copied ext/pcre/php_pcre.c and php_pcre.h and then
edited the new php_pcre.c to include php3string.h not phpstring.h.
But it did solve the problem. Thanks everyone.
On Wed, Dec 08, 1999 at 03:10:47PM -0800, Vincent Power wrote:
> 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
>
> --
> 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