php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3673 Backreferences not working!
Submitted: 2000-02-29 20:52 UTC Modified: 2000-03-05 11:50 UTC
From: sergio at ing dot puc dot cl Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Latest CVS (29/02/2000) OS: Redhat Linux 6.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sergio at ing dot puc dot cl
New email:
PHP Version: OS:

 

 [2000-02-29 20:52 UTC] sergio at ing dot puc dot cl
Backreferences are not working in the suplied regex functions.  The documentation says they are Posix 1003.2 compliant but you can't use a simple expresion like 
ereg("(.+)=\1","foo=foo",$m), it will never match It should be a) implemented to be Posix compliant or b) warned in the documentation. The only backreference usable is in ereg_replace, where you can use it in the substituion expresion. I talked to other people and they have the same problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-05 11:50 UTC] sas at cvs dot php dot net
Remember that PHP interpretes strings in double quotes, so instead of writing "(.+)=\1" you should write "(.+)=\\1" or '(.+)=\1'.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 08:00:01 2026 UTC