using System; using System.Text.RegularExpressions; public class MainClass { public static void Main (string[] args) { Regex reg = new Regex (@"\w"); foreach (Match match in reg.Matches) { Console.WriteLine("Match: |{0}|", match); } } }