From: Harry Kakueki Date: 2007-05-28T22:51:51+09:00 Subject: Re: remove all whitespaces in a string On 5/28/07, jochen kaechelin wrote: > I want to remove all whitespaces in a string. > I know strip to remove whitespaces at the beginning and the end > of the string. > > example: > > " bla @ bla. de " > > should become > > "bla@bla.de" > > How can I achieve this? > > Thanx > > This is probably slower, but here is another way you can try. p " bla @ bla. de ".split(/\s+/).join Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/