Doc #65890 [Opn]: PCRE escape sequence \R undocumented
| From: | cmb@php.net | Date: | Wed, 21 Mar 2018 13:35:08 +0000 |
| Subject: | Doc #65890 [Opn]: PCRE escape sequence \R undocumented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15550@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65890&edit=1
ID: 65890
Updated by: cmb@php.net
Reported by: krewecherl at gmail dot com
Summary: PCRE escape sequence \R undocumented
Status: Open
Type: Documentation Problem
Package: PCRE related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
The \R escape sequence has been documented in the meantime[1], but
the details are even more complex than reported in this ticket[2].
See also bug #62360.
[1] <http://svn.php.net/viewvc?view=revision&revision=339182>
[2] <https://nikic.github.io/2011/12/10/PCRE-and-newlines.html>
Previous Comments:
------------------------------------------------------------------------
[2013-10-13 15:54:35] krewecherl at gmail dot com
Description:
------------
This manual page on PCRE escape sequences
http://www.php.net/manual/en/regexp.reference.escape.php
is missing the \R (BSR, backslash-R) escape. One of the user comments mentions it, but not quite
correctly. Whether \R matches only CR, NL, and CR+LF, or *any* Unicode line break sequence, depends
on how the pcre extension is configured (flag: --enable-bsr-anycrlf), see the README in
ext/pcre/pcrelib.
The default mode is BSR_UNICODE, in which \R matches \r, \n, \r\n, U+0085, U+2028, and U+2029. I can
confirm this for the default Ubuntu packages, but I don't have any information about other
distributions/packages.
In any case, the escape sequence should be documented.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65890&edit=1