using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\b[0-9]+(?:[.,][0-9]+)*[ \t]+(?:Euro|PESO URUGUAY|U\$S EEUU|REAL|LIBRA ESTERLINA|PESO CHILENO)";
string input = @"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";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx