[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>
@ -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…
x
Reference in New Issue
Block a user