puts "hello I\r\nam a test\r\n\r\nstring".gsub(/\R+/, ' ')
Standard input is empty
hello I am a test string
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!