|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65890 PCRE escape sequence \R undocumented
Submitted: 2013-10-13 15:54 UTC Modified: 2018-03-21 13:35 UTC
Avg. Score:4.3 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: krewecherl at gmail dot com Assigned:
Status: Open Package: PCRE related
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.
Bug Type:
From: krewecherl at gmail dot com
New email:
PHP Version: OS:


 [2013-10-13 15:54 UTC] krewecherl at gmail dot com
This manual page on PCRE escape sequences

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 12:26 UTC]
-Package: Documentation problem +Package: PCRE related
 [2018-03-21 13:35 UTC]
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] <>
[2] <>
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 29 04:01:23 2020 UTC