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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC