re = /[\n\r]+/
str = 'Amazon.com: Sony XBR-65X900A 65-Inch 4K Ultra HD 120Hz 3D LED UHDTV (2013 Model): Electronics'
# Print the match result
str.match(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html