php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #3674 Backreferences need 2 backslashes to work in preg_* functions
Submitted: 2000-02-29 20:56 UTC Modified: 2001-04-16 05:53 UTC
From: sergio at ing dot puc dot cl Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0 OS: Redhat Linux 6.0
Private report: No CVE-ID: None
 [2000-02-29 20:56 UTC] sergio at ing dot puc dot cl
In the documentation it says that the backreferences should be used with one backslash.  Well, it doesn't work.  But, in the preg_replace documentation examples that you should use 2 backslashes (and it works in all functions the second way)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-10 14:39 UTC] jimw@php.net
refiled against 4.0. the sections of pcre.xml lifted from the pcre docs probably needs a caveat added about how backslashes need to be handled.
 [2001-04-16 05:53 UTC] jmoore@php.net
This has been corrected in documentation.

-James
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 20:01:31 2024 UTC