Replacing spaces

I have a long string “that looks like this”. I want to replace all
spaces in the string with " and ".

Alle lunedì 19 novembre 2007, Vapor … ha scritto:

I have a long string “that looks like this”. I want to replace all
spaces in the string with " and ".

“that looks like this”.gsub(" ", " and ")
=> that and looks and like and this

Stefano

Stefano C. wrote:

Alle lunedì 19 novembre 2007, Vapor … ha scritto:

I have a long string “that looks like this”. I want to replace all
spaces in the string with " and ".

“that looks like this”.gsub(" ", " and ")
=> that and looks and like and this

Stefano

thanks :slight_smile: