From: Phrogz Date: 2007-07-28T00:59:58+09:00 Subject: Re: Triming characters from the front of a String... On Jul 27, 9:13 am, Sebastian Hungerecker wrote: > sketchi...@gmail.com wrote: > > For the life of me I can't figure out an easy way to remove the first > > couple of characters from a String. I looked in my Ruby book, searched > > online, and checked the documentation for the String class. I must be > > missing something obvious. > str[x..-1] gives you str without the first x characters. And str[0..4]='' will replace the first 5 characters in the string with an empty string. Likewise str.sub!( /\A.{5}/m, '' ) will mutate the original string to replace the first 5 characters with an empty string.