re = /line-height: 1.45;\"\>(?P<value>.*)<\/h3><p class=3D|(?P<price>\$[,\d]*)<.p>/m
str = '-family: \'Montserrat\', sans-serif; text-decoration: none; color: #323232; f=
ont-weight: 500; font-size: 16px; line-height: 1.38;">$144,900</p><h3 class=
=3D"highlight-title" style=3D"margin: 0; margin-bottom: 6px; font-family: \'=
Montserrat\', sans-serif; text-decoration: none; color: #323232; font-weight=
: 500; font-size: 13px; line-height: 1.45;">Value1</h3><p class=3D"hi=
ghlight-description" style=3D"margin: 0; font-family: \'Montserrat\', sans-se=
rif; text-decoration: none; color: #323232; font-weight: 500; font-size: 13='
# 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