using System.Collections.Generic;
using System.Text.RegularExpressions;
public static void Main()
string texto = "select campo01 from <p_var_dwr>.tabla02 where campo01<=campo03 Who writer these noter?";
var arrtexto = texto.ToCharArray();
string pattern = @"\b"+reser+@"\w+\b";
Console.WriteLine(texto);
foreach (Match match in Regex.Matches(texto, pattern)) {
Console.WriteLine("Found '{0}' at position {1}",
match.Value, match.Index);
for (int i=match.Index-1;i<(match.Index)+reser.Length;i++){
mostrar=mostrar+arrtexto[i];
Console.WriteLine(mostrar);
Console.WriteLine("Otro:: "+texto.Substring(match.Index+reser.Length,3));