diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-11 18:59:45 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-11 18:59:45 +0000 |
commit | 2a9bb776469882184fba6ad154d48d2cf4db4381 (patch) | |
tree | dbaea3e5b31039b170a45c33c7712f85dda7fc69 | |
parent | a39ba551e278453d42eab9b50504ed70a161e21a (diff) | |
download | ruby-2a9bb776469882184fba6ad154d48d2cf4db4381.tar.gz |
string.c: docs for String#match
* string.c: [DOC] add example for String#match with pos argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3657,6 +3657,7 @@ static VALUE get_pat(VALUE); * 'hello'.match('(.)\1') #=> #<MatchData "ll" 1:"l"> * 'hello'.match('(.)\1')[0] #=> "ll" * 'hello'.match(/(.)\1/)[0] #=> "ll" + * 'hello'.match(/(.)\1/, 3) #=> nil * 'hello'.match('xx') #=> nil * * If a block is given, invoke the block with MatchData if match succeed, so |