Switch from String#gsub to String#sub

We only need to replace the first occurrence.

Should make the code more clear.
May perform better.