summaryrefslogtreecommitdiff
path: root/doc/regexp.rdoc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-03 23:18:01 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-03 23:18:01 +0900
commit7b2cd548aa52fa434006dccff62a6050ed5fd881 (patch)
treec399a0d9deef10bbd0ff98bbfc391f0ecb3b3d11 /doc/regexp.rdoc
parentf8b3d7d1599ecaa6760d947609f966a7a5b22e2c (diff)
[DOC] mentioned `\R` [ci skip]
Diffstat (limited to 'doc/regexp.rdoc')
-rw-r--r--doc/regexp.rdoc3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/regexp.rdoc b/doc/regexp.rdoc
index c14a145831..ccf82538b7 100644
--- a/doc/regexp.rdoc
+++ b/doc/regexp.rdoc
@@ -132,6 +132,9 @@ The following metacharacters also behave like character classes:
* <tt>/\H/</tt> - A non-hexdigit character (<tt>[^0-9a-fA-F]</tt>)
* <tt>/\s/</tt> - A whitespace character: <tt>/[ \t\r\n\f\v]/</tt>
* <tt>/\S/</tt> - A non-whitespace character: <tt>/[^ \t\r\n\f\v]/</tt>
+* <tt>/\R/</tt> - A linebreak: <tt>\n</tt>, <tt>\v</tt>, <tt>\f</tt>, <tt>\r</tt>
+ <tt>\u0085</tt> (NEXT LINE), <tt>\u2028</tt> (LINE SEPARATOR), <tt>\u2029</tt> (PARAGRAPH SEPARATOR)
+ or <tt>\r\n</tt>.
POSIX <i>bracket expressions</i> are also similar to character classes.
They provide a portable alternative to the above, with the added benefit