From: MonkeeSage Date: 2006-09-15T20:40:52+09:00 Subject: Re: Keep only one part of a string Zouplaz wrote: > Sorry, what I would like to know is if there is a another String method > to delete a part of a string instead of gsub > > In the string "REF:90 REFERAL" > > I want REF: to be deleted but not the REF or REFERAL > > I've tried with the .delete method but each R, E F : char was deleted in > the string You want String#slice! s = 'REF:90 REFERAL' s.slice!('REF:') # => "REF:" s # => "90 REFERAL" Check out the core documentation for the String class: http://ruby-doc.org/core/classes/String.html Regards, Jordan