Thriving K. wrote:
> I want to strip any whitespace that more than 1 to be 1
> 
> For example "A    B    C" ===> "A B C"
> 
>             "Very    Important" ===> "Very Important"

In Rails (and nobody mentioned it), use String#squish or String#squish!
-- 
Posted via http://www.ruby-forum.com/.