From: Nuralanur@... Date: 2006-07-31T07:35:00+09:00 Subject: Re: Howto Delete 3 Leftmost Characters -------------------------------1154298892 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit You can delete white spaces at the start and at the end of a string like this: string=" a long string " string1=string.sub(/^ +/,'') string2=string.sub(/ +$/,'') The ^ stands for eliminating things at the start, the + stands for eliminating 1 or more occurrences of a whitespace, and the $ stands for looking to the end of a string. I can't comment on whether it's the best way to learn about Regexp, but _http://www.regular-expressions.info_ (http://www.regular-expressions.info) has a special Ruby section. If you want to know it all, there is a book Mastering Regular Expressions by Jeffrey Friedl, published with O'Reilly .... but maybe that's too much for a start. Best regards, Axel -------------------------------1154298892--