Ruby Global $' (DollarTick) - rking/pry-docmore GitHub Wiki

The $' global is the string to the right of the last successful match.

If you do this:

str = 'hello goodbye'; str[/good/]

Then this:

[ $`, $&, $' ]

Yields this:

[
    "hello ",
    "good",
    "bye"
]
⚠️ **GitHub.com Fallback** ⚠️