re = /\b\d+(?:\.\d+)/
str = 't=APTO&ty=c&p=d&b=1">13.49M</a>, <a class="screener-link" href="quote.ashx?t=APTO&ty=c&p=d&b=1">-</a>, <a class="screener-link" href="quote.ashx?t=APTO&ty=c&p=d&b=1"><span style="color:#008800;">1.53</span></a>, <a class="screener-link" href="quote.ashx?t=APTO&ty=c&p=d&b=1"><span style="color:#008800;">53.00%</span></a>, <a class="screener-link" href="quote.ashx?t=APTO&ty=c&p=d&b=1">8,030,287</a>, <a class="screener-link" href="quote.ashx?t=EVOK&ty=c&p=d&b=1">2</a>, <a class="screener-link"
'
# 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