[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
|
== Alternation
|
||||||
|
|
||||||
The vertical bar metacharacter (<tt>|</tt>) combines two expressions into
|
The vertical bar metacharacter (<tt>|</tt>) combines several expressions into
|
||||||
a single one that matches either of the expressions. Each expression is an
|
a single one that matches any of the expressions. Each expression is an
|
||||||
<i>alternative</i>.
|
<i>alternative</i>.
|
||||||
|
|
||||||
/\w(and|or)\w/.match("Feliformia") #=> #<MatchData "form" 1:"or">
|
/\w(and|or)\w/.match("Feliformia") #=> #<MatchData "form" 1:"or">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user