From: Oscar Lok Date: 2006-09-16T01:06:44+09:00 Subject: Re: Need help about Ruby with text file > Example file contains: > > aabbcc > ddeeff > gghhii > jjkkll > > Output: > > 2: hh > Thanks a lots! Ruby script really is a great script! By the way, may I know that is there any function like e.g. left(line, 3), right(line, 2) and mid(line, 1, 4) to extract letter from a line, please? e.g. mid(gghhii,3,2) return hh left(gghhii,3) return ggh right(gghhii,3) return hii Thanks! Oscar -- Posted via http://www.ruby-forum.com/.