php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63650 wrong regex for comments
Submitted: 2012-11-29 14:53 UTC Modified: 2012-11-29 19:50 UTC
From: davidbruchmann at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: davidbruchmann at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-29 14:53 UTC] davidbruchmann at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/regexp.reference.comments
---
its said:
"The sequence (?# marks ..."

Thats wrong cause the sequence / expression has to be closed.
Correct is:
"The sequence (?#) marks ..."


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-29 18:27 UTC] salathe@php.net
-Status: Open +Status: Not a bug
 [2012-11-29 18:27 UTC] salathe@php.net
The full sentence reads, "The sequence (?# marks the start of a comment which 
continues up to the next closing parenthesis."
 [2012-11-29 18:55 UTC] davidbruchmann at gmail dot com
right and it isn't 100% clear what is meant.
Additionally I thought comments of a file could be filtered with that expression, 
fact is that it doesn't work like that and the expression is for some other 
purpose, so the whole explanation isn't clear even if the closing parenthesis 
would be added. An example would be nice.
 [2012-11-29 19:50 UTC] salathe@php.net
Perhaps you could offer your own addition(s).

https://edit.php.net/?perm=/en/reference.pcre.pattern.syntax.php&project=PHP
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Apr 16 02:01:23 2021 UTC