variable $MATCH

$MATCH -> String | nil[permalink][rdoc][edit] [added by English]

$& の別名

require "English"

str = 'hoge,foo,bar,hee,hoo'

/(foo|bar)/ =~ str
p $MATCH     #=> "foo"