Converting white space into single space

Ruby, 2016-01-15 11:55:55 UTC
"this   is       text".gsub(/\s+/, ' ') #=> this is text

Share: