PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
MatchData
U:RDoc::AnyMethod[iI"[]:ETI"MatchData#[];TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"HWhen arguments +index+, +start and +length+, or +range+ are given, ;TI"9returns match and captures in the style of Array#[]:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI":# => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8"> ;TI"m[0] # => "HX1138" ;TI"m[1, 2] # => ["H", "X"] ;TI"%m[1..3] # => ["H", "X", "113"] ;TI" m[-3, 2] # => ["X", "113"] ;T:@format0o; ; [I"5When string or symbol argument +name+ is given, ;TI"6returns the matched substring for the given name:;T@o;; [ I"0m = /(?<foo>.)(.)(?<bar>.+)/.match("hoge") ;TI"/# => #<MatchData "hoge" foo:"h" bar:"ge"> ;TI"m['foo'] # => "h" ;TI"m[:bar] # => "ge" ;T; 0o; ; [I"GIf multiple captures have the same name, returns the last matched ;TI"substring.;T@o;; [I"-m = /(?<foo>.)(?<foo>.+)/.match("hoge") ;TI"0# => #<MatchData "hoge" foo:"h" foo:"oge"> ;TI"m[:foo] #=> "oge" ;TI" ;TI">m = /\W(?<foo>.+)|\w(?<foo>.+)|(?<foo>.+)/.match("hoge") ;TI"3#<MatchData "hoge" foo:nil foo:"oge" foo:nil> ;TI"m[:foo] #=> "oge";T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"matchdata[index] -> string or nil matchdata[start, length] -> array matchdata[range] -> array matchdata[name] -> string or nil ;T0[ I"(p1, p2 = v2);T@/FI"MatchData;TcRDoc::NormalClass00
[-] string-i.ri
[edit]
[-] size-i.ri
[edit]
[-] end-i.ri
[edit]
[-] to_s-i.ri
[edit]
[-] captures-i.ri
[edit]
[-] offset-i.ri
[edit]
[-] to_a-i.ri
[edit]
[-] match-i.ri
[edit]
[-] match_length-i.ri
[edit]
[-] pre_match-i.ri
[edit]
[-] deconstruct-i.ri
[edit]
[-] names-i.ri
[edit]
[-] byteoffset-i.ri
[edit]
[-] cdesc-MatchData.ri
[edit]
[-] deconstruct_keys-i.ri
[edit]
[-] hash-i.ri
[edit]
[-] values_at-i.ri
[edit]
[-] eql%3f-i.ri
[edit]
[-] regexp-i.ri
[edit]
[-] begin-i.ri
[edit]
[-] named_captures-i.ri
[edit]
[-] %5b%5d-i.ri
[edit]
[+]
..
[-] bytebegin-i.ri
[edit]
[-] %3d%3d-i.ri
[edit]
[-] inspect-i.ri
[edit]
[-] byteend-i.ri
[edit]
[-] length-i.ri
[edit]
[-] post_match-i.ri
[edit]