re = /(?:[^-]*-\s*){2}(.*)/m
str = 'The Rational Optimist: How Prosperity Evolves by Matt Ridley /Abundance : The Future Is better Than You Think by Peter Diamonds and Steven Kotler./The Sixth Wave : How to Succeed in a Resource-limited World by James Bradfield Moody and Bianca Nogrady/ What\'s Mine is Yours: The Rise of Collaborative Consumption by Rachel Botsman and Roo Rogers. - How to Own the World'
# Print the match result
str.scan(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