From: nobu.nokada@... Date: 2003-11-17T12:40:00+09:00 Subject: Re: substring: to the end of the string Hi, At Sat, 15 Nov 2003 23:58:55 +0900, Austin Ziegler wrote: > As Gavin pointed out, regexen are overkill here. However, the > technique is worth noting: Another syntax sugar, > class String > def substring(start, len = nil) > if len.nil? self[/\A.{#{start}}(.*)/m, 1] > else self[/\A.{#{start}}(.{#{len}})/m, 1] > end > $1 > end > end -- Nobu Nakada