--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Match Reference---MatchData acts as an array, and may be accessed using the normal array indexing techniques. mtch[0] is equivalent to the special variable $&, and returns the entire matched string. mtch[1], mtch[2], and so on return the values of the matched backreferences (portions of the pattern between parentheses).
- !ruby/struct:SM::Flow::VERB
body: " m = /(.)(.)(\\d+)(\\d)/.match("THX1138.")\n m[0] #=> "HX1138"\n m[1, 2] #=> ["H", "X"]\n m[1..3] #=> ["H", "X", "113"]\n m[-3, 2] #=> ["X", "113"]\n"
full_name: MatchData#[]
is_singleton: false
name: "[]"
params: |
mtch[i] => obj
mtch[start, length] => array
mtch[range] => array
visibility: public