|  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.0 ± 0.7
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: krewecherl at gmail dot com Assigned:
Status: Open Package: PCRE related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 23:01:30 2024 UTC