ID: 19581 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: All PHP Version: 4.2.3 New Comment:
Well, we also don't document SQL or most other features that come from external libraries/packages. There is nothing PHP-specific about the regular expressions on PHP. The preg_* syntax is documented at http://www.pcre.org/man.txt and the ereg_* is straight POSIX 1003.2 which is widely documented. If someone was to sit down and write better regular expression docs, then they would probably not end up in the php docs anyway but rather at pcre.org or as an addendum to the POSIX spec. Previous Comments: ------------------------------------------------------------------------ [2002-09-24 13:16:02] [EMAIL PROTECTED] The exact page to which I am referring is: http://www.php.net/manual/en/ref.regex.php ------------------------------------------------------------------------ [2002-09-24 13:06:41] [EMAIL PROTECTED] I know maybe nobody wants to take on the task of properly documenting regular expressions, but, hey, is the following (taken from the PHP site documentation) REALLY the best that can be done: "PHP uses the POSIX extended regular expressions as defined by POSIX 1003.2. For a full description of POSIX regular expressions see the regex man pages included in the regex directory in the PHP distribution. It's in manpage format, so you'll want to do something along the lines of man /usr/local/src/regex/regex.7 in order to read it." I simply think that the described document, or at least the essence of its contents, should be included on the website. I am, I think, a typical PHP user - I use PHP, and when I want documentation on a PHP item, I go to the PHP website. To be greeted by such statements is absurd. Even if I thought I understood what it was suggesting, you seriously cannot be expecting the average PHP programmer to really do what is suggested? Regular expressions are voodoo as it is, without making the eager new magician perform fantastic magic even to be able to find the book of spells. Generally, the PHP documentation is fantastic. The search facility is wonderful. It is well structured. It is comprehensive. It is complete. But this part on regular expressions is abysmal. Specifically, what I would like to see (I have never seen the above documentation, so I don't know what is in it), is a proper description of each of the possible values within a regular expression, including the 'magic' values like [:alphanum:], with plenty of good examples. It perhaps needs several pages organised in a structured way to cover the complex topic. I understand when faced with the task, the early documenters held their hands up in horror at the large task. But, in my humble opinion, this is a gaping hole in an otherwise excellent documentation. I say it is time for the hole to be filled. Thanks! Hugh Prior ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19581&edit=1