using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"([(\w|N°|#|.\s]+\d+)";
string input = @"Colón N° 346 (Entre 21 de Mayo y Sotomayor)
Diego Portales Nº2291
Av. Pedro Aguirre Cerda N° 1010
Tarapaca N° 729
Local 3 A 1er. Piso, Centro de Convenciones Zofri
Av. Héroes de la Concepción Nº 2653
Cerro Esmeralda 3130
Mall Calama, Balmaceda N° 3242 Local S-08
Av. Chorrillos # 1759 Local 1082 Exterior Jumbo
Av. Balmaceda N° 2355 Local BS - 121 / Subterráneo sector servicios
Av. Balmaceda N° 2337 - Local 2
Angamos N° 610 (Interior Universidad)
";
foreach (Match m in Regex.Matches(input, pattern))
{
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