re = /Score[^\.]*/
str = 'Pale straw in colour, it has that characteristic lychee and rose petal nose and Turkish delight flavour, finishing elegantly dry on a pear-like note. Score - 4 Stars. (Tony Aspler, tonyaspler.com, Feb. 2016)
The quick red fox jumped over the lazy brown dog
Score.+?\\.
.*?quick[^z]*'
# 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