Replace text in strings with ruby gsub
1 2 3 4 | # data is a hash with strings having \r\n. I want to replace the \r with \n. This is coming from a scrubyt script I was using to scrape content. The content was dirtied with these strange \r's. cutterbutter = data[:body].to_s.gsub("\r","\n") puts cutterbutter |
