From: Daniel N Date: 2007-06-18T09:52:22+09:00 Subject: Re: Parsing strings ------=_Part_52406_9981574.1182127940620 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/18/07, NB88 wrote: > > Quick question, is there a method for deleting substrings from within a > string. If not, does anyone have any suggestions? > > -Thanks the gsub or gsub! methods will do this. They take a pattern (string or regexp) and replace it with whatever you specify. In this case an empty string. http://www.ruby-doc.org/core/classes/String.html#M000839 e.g. "The quck brown fox".gub( /brown/, "" ) #=> "The quick fox" Cheers Daniel ------=_Part_52406_9981574.1182127940620--