captures()
public
Returns the array of captures; equivalent to mtch.to_a.
f1,f2,f3,f4 = /(.)(.)(\d+)(\d)/.match("THX1138.").captures
f1
f2
f3
f4
Show source
/*
* call-seq:
* mtch.captures => array
*
* Returns the array of captures; equivalent to <code>mtch.to_a[1..-1]</code>.
*
* f1,f2,f3,f4 = /(.)(.)(\d+)(\d)/.match("THX1138.").captures
* f1
* f2
* f3
* f4
*/
static VALUE
match_captures(match)
VALUE match;
{
return match_array(match, 1);
}