Skip to content

Commit 22fe80f

Browse files
carlzulaufnobu
authored andcommitted
Fix Typo in Regular Expressions docs (_regexp.rdoc)
Small fix for a typo in the regular expression docs. The line of code above this change does not produce the output shown in the docs. With this change the docs will show the correct output for this example of using regex quantifiers.
1 parent d80c03d commit 22fe80f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/_regexp.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ An added _quantifier_ specifies how many matches are required or allowed:
502502
/\w*/.match('x')
503503
# => #<MatchData "x">
504504
/\w*/.match('xyz')
505-
# => #<MatchData "yz">
505+
# => #<MatchData "xyz">
506506

507507
- <tt>+</tt> - Matches one or more times:
508508

0 commit comments

Comments
 (0)