Ruby Global $ (DollarPlus) - rking/pry-docmore GitHub Wiki
The $+ global is the highest group matched by the last successful match.
This:
str = 'hello goodbye'; str[/he(llo) g(o(od))/]; $+
Shows:
"od"
The $+ global is the highest group matched by the last successful match.
This:
str = 'hello goodbye'; str[/he(llo) g(o(od))/]; $+
Shows:
"od"