1
0
Fork 0
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:
Ulysses Zhan 2021-07-22 13:10:57 +08:00 committed by GitHub
parent d6b8819b79
commit e4b68ab700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>

View file

@ -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">