ruby-changes:58550
From: Nobuyoshi <ko1@a...>
Date: Sun, 3 Nov 2019 23:18:47 +0900 (JST)
Subject: [ruby-changes:58550] 7b2cd548aa (master): [DOC] mentioned `\R` [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=7b2cd548aa From 7b2cd548aa52fa434006dccff62a6050ed5fd881 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 3 Nov 2019 23:18:01 +0900 Subject: [DOC] mentioned `\R` [ci skip] diff --git a/doc/regexp.rdoc b/doc/regexp.rdoc index c14a145..ccf8253 100644 --- a/doc/regexp.rdoc +++ b/doc/regexp.rdoc @@ -132,6 +132,9 @@ The following metacharacters also behave like character classes: https://github.com/ruby/ruby/blob/trunk/doc/regexp.rdoc#L132 * <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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/