U:RDoc::AnyMethod[iI"[]:ETI"MatchData#[];TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LMatch Reference -- MatchData
acts as an array, and may be ;TI"Paccessed using the normal array indexing techniques. mtch[0]
;TI"Lis equivalent to the special variable $&
, and returns the ;TI"Pentire matched string. mtch[1]
, mtch[2]
, and so ;TI"Ion return the values of the matched backreferences (portions of the ;TI""pattern between parentheses).;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.")
;TI"Dm #=> #
;TI"m[0] #=> "HX1138"
;TI"m[1, 2] #=> ["H", "X"]
;TI"&m[1..3] #=> ["H", "X", "113"]
;TI"!m[-3, 2] #=> ["X", "113"]
;TI"
;TI"'m = /(?a+)b/.match("ccaaab")
;TI"2m #=> #
;TI"m["foo"] #=> "aaa"
;TI"m[:foo] #=> "aaa";T:@format0:
@fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"†mtch[i] -> str or nil
mtch[start, length] -> array
mtch[range] -> array
mtch[name] -> str or nil
;T0[ I"(p1, p2 = v2);T@!FI"MatchData;TcRDoc::NormalClass00