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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 14:01:33 2024 UTC