mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Fixed the description of regexp alternations [ci skip]
This commit is contained in:
parent
d6b8819b79
commit
e4b68ab700
Notes:
git
2021-07-22 14:11:19 +09:00
Merged: https://github.com/ruby/ruby/pull/4661 Merged-By: nobu <nobu@ruby-lang.org>
1 changed files with 2 additions and 2 deletions
|
@ -372,8 +372,8 @@ then matches a literal <i>)</i>:
|
|||
|
||||
== Alternation
|
||||
|
||||
The vertical bar metacharacter (<tt>|</tt>) combines two expressions into
|
||||
a single one that matches either of the expressions. Each expression is an
|
||||
The vertical bar metacharacter (<tt>|</tt>) combines several expressions into
|
||||
a single one that matches any of the expressions. Each expression is an
|
||||
<i>alternative</i>.
|
||||
|
||||
/\w(and|or)\w/.match("Feliformia") #=> #<MatchData "form" 1:"or">
|
||||
|
|
Loading…
Reference in a new issue