Forum: Ruby on Rails Replace Carriage Return and New Line with Blank Space

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ba79eb31ceaef95e9e52f5e5e4ec6d02?d=identicon&s=25 John Kopanas (Guest)
on 2007-05-13 17:34
(Received via mailing list)
How come something so simple is seemingly so hard this morning.

How do I replace all carriage returns and new line characters with a
blank space?  Should be straight forward no?

Your Friend,


John Kopanas
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-05-13 17:41
(Received via mailing list)
string_with_returns_and_newlines.gsub(/\r?\n/, " ") work?

This topic is locked and can not be replied to.