Hello, I need to make the first string below into the second string.
That is, only single white spaces are permitted.

"1/4 WELDING    LEVER FRONT DRW 14844-C  MAT  WMA1CM-WLFRONT"
into
"1/4 WELDING LEVER FRONT DRW 14844-C MAT WMA1CM-WLFRONT"



I want to use the sub! method. Why does the below code not work? Is my
pattern incorrect?

descrip = "1/4 WELDING    LEVER FRONT DRW 14844-C  MAT  WMA1CM-WLFRONT"
descrip.sub!(/\s+/,' ')
puts descrip



Thank-you in advance,
Michelle

-- 
Posted via http://www.ruby-forum.com/.