Method: MatchData#values_at

Defined in:
re.c

#values_at([index]) ⇒ Array

Uses each index to access the matching values, returning an array of the corresponding matches.

m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
m.to_a               #=> ["HX1138", "H", "X", "113", "8"]
m.values_at(0, 2, -2)   #=> ["HX1138", "X", "113"]

Returns:



1233
1234
1235
# File 're.c', line 1233

static VALUE
match_values_at(argc, argv, match)
int argc;