re = /^(?:(?:\d+|\d{1,3}(?:,\d{3})*)\R){2,}/m
str = 'Peie
71,176,953
T-re
71,173,557
5-Mts
41,653,495
45678
Sia
36,136,829
36,100,829
4-Diepi
120,829
uteCra
36,100
Oct2018
'
# 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