Re: scanning strings, backward?

I think Bil just wants to remove part of the line rather than all of it:

  1. Remove /dt/i

i.e.
line.gsub!(//dt/i/, ‘’)

Using String::gsub as suggested by Vidar

Gem

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs