Repository URL to install this package:
|
Version:
2.2.2-1 ▾
|
U:RDoc::AnyMethod[iI"[]:ETI"MatchData#[];TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LMatch Reference -- <code>MatchData</code> acts as an array, and may be ;TI"Paccessed using the normal array indexing techniques. <code>mtch[0]</code> ;TI"Lis equivalent to the special variable <code>$&</code>, and returns the ;TI"Pentire matched string. <code>mtch[1]</code>, <code>mtch[2]</code>, 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 #=> #<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"]
;TI"
;TI"'m = /(?<foo>a+)b/.match("ccaaab")
;TI"2m #=> #<MatchData "aaab" foo:"aaa">
;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