mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] mentioned \R
[ci skip]
This commit is contained in:
parent
f8b3d7d159
commit
7b2cd548aa
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue