From: Chris Morris Date: 2000-12-13T10:46:41+09:00 Subject: [ruby-talk:7119] Re: Rubyize this method > Why not: > > def lopOff(s, substr) > s =~ substr > return $' > end The following also works. It's a bit longer, but fits on one line: def lopOff(s, substr) /#{substr}/.match(s).post_match end