Skip to content

Ruby Global $+ (DollarPlus)

☈king edited this page Nov 19, 2012 · 5 revisions

The $+ global is the highest group matched by the last successful match.

This:

str = 'hello goodbye'; str[/he(llo) g(o(od))/]; $+

Shows:

"od"

Clone this wiki locally