Ruby Global $& (DollarAmpersand) - rking/pry-docmore GitHub Wiki
The $& global is the string matched by the last successful match.
If you do this:
str = 'hello goodbye'; str[/good/]
Then this:
[ $`, $&, $' ]
Yields this:
[
"hello ",
"good",
"bye"
]