Method: MatchData#to_a
- Defined in:
- re.c
#to_a ⇒ Array
Returns the array of matches:
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
# => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">
m.to_a # => ["HX1138", "H", "X", "113", "8"]
Related: MatchData#captures.
2100 2101 2102 2103 2104 |
# File 're.c', line 2100
static VALUE
match_to_a(VALUE match)
{
return match_array(match, 0);
}
|