re = /\b[0-9]+(?:[.,][0-9]+)*[ \t]+(?:Euro|PESO URUGUAY|U\$S EEUU|REAL|LIBRA ESTERLINA|PESO CHILENO)/m
str = 'Monto: 150,00 Euro
Monto: 7.350,00 PESO URUGUAY | Pesos: 12.495,00 | Sucursal: 36|
Monto: 2.500,00 PESO URUGUAY
Monto: 200,00 U$S EEUU | Pesos: 12.550,00
Monto: 50,00 U$S EEUU
Monto: 700,00 REAL | Pesos: 10.500,00 | Sucursal: 101
Monto: 100,00 LIBRA ESTERLINA | Pesos: 8.500,00 | Sucursal: 12
Monto: 5.000,00 PESO CHILENO | Pesos: 400,00 | Sucursal: 101'
# 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