Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 100890 - regex parsing error on literal { or }
regex parsing error on literal { or }
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-07-26 15:55 EDT by Yan Fitterer
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-25 11:46:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yan Fitterer 2003-07-26 15:55:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

Description of problem:
Trying to match a literal { or } inside a POSIX regex (ereg function for ex)
doesn't work in all cases. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
if (ereg("^\{$","{")) echo "^\{$ matched {";
if (ereg("^\{\}$","{}")) echo "^\{\}$ matched {}";

Actual Results:
Warning: Unmatched \{ in /usr/local/typo3/museum/phptest.php on line 2
Warning: Invalid content of \{\} in /usr/local/typo3/museum/phptest.php on line 3

Expected Results:
^{$ matched {
^{\}$ matched {} 

Additional info:

Works OK in php 4.2.3. Not sure exact version when was fixed.
Comment 1 Joe Orton 2003-07-28 06:49:40 EDT
See http://www.php.net/manual/en/language.types.string.php

You need to escape the regex pattern like


Comment 2 Yan Fitterer 2003-07-29 03:56:12 EDT
Slight problem here, the expression as I originally quoted it works OK on other 
compiles of php 4.1.2, including those in use by the php.net people. 

See http://bugs.php.net/bug.php?id=24821

As explained (and verified by me on several boxes), this very script works OK 
on other 4.1.2 compiles, on 4.2.2, on 4.2.3 and on latest PHP5-dev.

I hear from some more experienced programmer that it's something to do with the 
non-default compiled regex library - maybe something to do with your
"--with-regex=system" compile switch?

The bottom line of this is that some perfectly working php code (as far as the 
rest of the world is concerned), doesn't work on RH 7.3. What can you do about 

Comment 3 Joe Orton 2005-01-25 11:46:59 EST
Thanks for the report.  This is a mass bug update; since this release
of Red Hat Linux is no longer supported, please either:

a) try and reproduce the bug with a supported version of Red Hat
Enterprise Linux or Fedora Core, and re-open this bug as appropriate
after changing the Product field, or,

b) if relevant, try and reproduce this bug using the current version
of the upstream package, and report the bug upstream.

c) report the bug to the Fedora Legacy project who may wish to
continue maintenance of this package.

Note You need to log in before you can comment on or make changes to this bug.