#49327 [Opn]: missing documentation
| From: | torben@php.net | Date: | Sat, 22 Aug 2009 23:17:40 +0000 |
| Subject: | #49327 [Opn]: missing documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2648@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
Bug Type: Documentation problem
Operating System: linux
PHP Version: Irrelevant
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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