I have a string "foo bar man chu" and I want to select the last 5 characters from it.
The regex expression /.{5}$/
does the job of selecting them, but how do I save them to a string in Rails? gsub(/.{5}$/,'')
removes them, kind of the opposite of what I want. Thanks!