#49327 [Opn->Bgs]: missing documentation
| From: | torben@php.net | Date: | Sun, 23 Aug 2009 06:26:52 +0000 |
| Subject: | #49327 [Opn->Bgs]: missing documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2649@lists.php.net to get a copy of this message | ||
ID: 49327
Updated by: torben@php.net
Reported By: layton at layton dot tk
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: linux
PHP Version: Irrelevant
New Comment:
On second thought, the current documentation makes this information
clearly available, especially in the online manual where there is a link
right from the same page clearly labeled 'Regular Expressions
(Perl-compatible)'--which hopefully the interested reader would take the
time to click. Even in other generated versions of the documentation,
this information is easily found within the PCRE section of the manual
with only a minimum of effort.
Previous Comments:
------------------------------------------------------------------------
[2009-08-22 23:17:39] torben@php.net
The syntax is also quite heavily documented in the PCRE section of the
PHP manual, under 'PCRE Syntax':
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
The only reason I haven't marked this as Bogus is that perhaps the
preg_*() function entries could use a 'See also' link to the syntax
page.
------------------------------------------------------------------------
[2009-08-22 19:57:07] niel dot archer at blueyonder dot co dot uk
PCRE is documented at http://www.pcre.org/
------------------------------------------------------------------------
[2009-08-22 02:21:29] layton at layton dot tk
Description:
------------
the preg_match documentation and its relatives assume that the reader
knows what all the special characters mean that make up a possible
regular expression. I know that "everybody" knows perl -- except that a
lot of people don't, and I know that "everybody" uses regular
expressions, except that I wouldn't know if a perl regular expression
would be the same as a lex regular expression.
PS. your obsoleted regular expression functions are well documented.
but those regular expressions don't work here, so I presume something
has changed, although I wouldn't know what.
PPS. when I was googling for answers, I found somebody who said that an
! meant something about an assertion, but neither he nor I understood
what that might mean.
Reproduce code:
---------------
---
From manual page: function.preg-match
---
@^(?:http://)?([^/]+)@i
Expected result:
----------------
The man page says that I should expect this to match on the domain name
part of a url.
What I expected was some place that said
@ means .......
^ means .......
( means .......
and so on.
Actual result:
--------------
confusion. The examples don't mean much when you don't know what the
special characters mean.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49327&edit=1