@shacker To make sure that you're only removing the last match of the string, I'm wondering if i can ask you to try and use something different. [gsub](http://ruby-doc.org/core-1.9.3/String.html#method-i-gsub) is by default greedy and looks for all. You might be interested in using [match](http://ruby-doc.org/core-1.9.3/String.html#method-i-match) and the last element of the MatchData array (you can use -1 as an index to get to the last match) or something along these lines to make sure the tail entry is removed.